FireFoxII
FireFoxII

Reputation: 828

Export more than one page html to single pdf

I have a little project built in php/javascript which every page are split in two parts. On left side a list of href, for example

<a href="index.php?id=1>page 1</a>
<a href="index.php?id=2>page 2</a>
<a href="index.php?id=3>page 3</a>

then on right side some code block that load info from xml file (file1.xml, fil2.xml, file3.xml) depending on id of url

Now I need to create a button at the end of left list that create a single PDF of all this page

Any Suggestions?

Upvotes: 1

Views: 516

Answers (2)

mpalencia
mpalencia

Reputation: 6007

I think the easy way to do this:

(1) convert your html pages to PDF 'online' using web2pdfconvert , htmlpdf or pdfcrowd

(2) then put the PDF file on your server

(3) create a button, that when you click it will download the PDF file

Upvotes: 0

Paul Denisevich
Paul Denisevich

Reputation: 2414

You can use DOMPDF to generate PDF from HTML. So what you can do is you can write a PHP script that grabs all data from those pages, combine it in one HTML code and convert to PDF using DOMPDF.

Upvotes: 1

Related Questions