Deprecated! Please use url2pdf3 which uses up to date technology and is mantained!
rf-api-url2pdf
Create a pdf from a website via given url, return the pdf file content as buffer. Take snapshots of multiple sites and merge the pdfs, when an array of urls is passed.
Getting Started
npm install rf-api-url2pdf
Init the service
var services: getPdf: start saveDir: '/pdfTmp' // path where the pdfs are stored getPdf
Use the service
// simple exampleservice // take a snapshot of multiple sites and join the pdfsvar urls = 'http://www.ebay.de' 'http://www.google.com'; service // with rf-apiAPI // optionsvar options = saveDir: '/exportTemp' // optional alternativ path to create pdfs loadTimeout: 3000 // timeout in [ms] to wait till site should be loaded onlyFilePath: false // only return path to pdf files, do not read them in buffer: false // false: return file content; true: return a buffer from binary file content debug: true // optional show phantom debug messages;service
Development
Install the dev tools with
npm install
Then you can runs some test cases and eslint with:
npm test
Legal Issues
- License: MIT
- Author: Rapidfacture GmbH