Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhantomJs rasterization - possible to make a multipage pdf from multiple pages?

Tags:

npm

pdf

phantomjs

I'm running phantom using their rasterize example script to create a single-page pdf of a page.

I have several different pages that I would like to rasterize and concatenate into a multipage pdf file. Is this possible with what is currently there or do I have to bring a tool like pdftk into the mix?

(alternately, is there another node module that I can use for this - I found pdftk-helper but it's shall we say...unfinished)

like image 720
George Mauer Avatar asked Jan 14 '13 21:01

George Mauer


1 Answers

Add to following from where you want to start a new page:

<div style="page-break-before:always;"></div>

More information about this can be found here: http://we-love-php.blogspot.be/2012/12/create-pdf-invoices-with-html5-and-phantomjs.html

like image 169
jeroen.verhoest Avatar answered Sep 28 '22 07:09

jeroen.verhoest