JohnMcLear / draw

A real time collaborative drawing tool using nodejs, socket.io & paper.js
Apache License 2.0
482 stars 158 forks source link

import PDF convert to raster. #219

Open theoryshaw opened 8 years ago

theoryshaw commented 8 years ago

Would there be a relatively easy way to use something like Ghostscript and/or ImageMagick to convert an uploaded (or drag and dropped) PDF to a background raster image?

theoryshaw commented 8 years ago

perhaps https://github.com/yourdeveloper/node-imagemagick ? or https://github.com/aheckmann/gm?

bytesnz commented 8 years ago

There is also https://www.npmjs.com/package/pdf2json and https://www.npmjs.com/package/pdf for converting PDFs to json (for canvas) or to images. Would need to look into benefits/drawbacks. Would probably be worth testing the libraries to see if there are any gotchas.

theoryshaw commented 8 years ago

I like that pdf2json taps into pdf.js--a project with a lot of momentum behind, it seems.

theoryshaw commented 8 years ago

Ran across this too: https://github.com/mooz/node-pdf-image