I can create one-page PDFs with phantomJS; but I can't find on the doc how to create different pages (each page coming from an html view) and put them into one PDF ? I am using node-phantom module for NodeJS
相关问题
- Correctly parse PDF paragraphs with Python
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Set BaseUrl of an existing Pdf Document
- google-drive can't get push notifications
- How to reimport module with ES6 import
相关文章
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
- Python Sendgrid send email with PDF attachment fil
Just need to specify a
paperSize
.Like this with module "phantom": "0.5.1"
Then, simply use page-break-before: always; in your HTML content each time you want to open a new page.
PS: I use async.waterfall in this example
PPS: Math.random on port number is used to avoid module crash if concurrent calls to phantom binary are triggered. Works fine - if someone wants to post something better even if a bit off-topic, feel free to do it