This code receives a PDF file, breaks each page into a .png file. Than each page is resized into 4 levels of zoom (TBD) than each resized picture is cropped into 256x256 tiles.
GET /files
Retrieve all file ids currently available
GET /files/:id
Retrieve pdf file
GET /files/:id/:page?zoom=[zoom]&row=[row]&col=[col]
Retrieve tile from file id and page [page] in zoom [zoom] row and col. Each tile has 256x256 resolution
GET /files/:id/:page/info
Retrieve page resolution (width and height) {"width": 750,"height": 580}
GET /files/:id/pages
Retrieve count of pages of pdf {"numPages": 1}
1. Install install GraphicsMagick or ImageMagick
2. Make sure you have Ghostscript
3. Install RabbitMQ or point to a RabbitMQ changing the queue/config.js
file
4. npm install
5. Run index.jx
and queue/receiver.js
node-canvas node-canvas was used on previous versions bellow 0.1, node-canvas](https://github.com/Automattic/node-canvas), choose your OS instalation