Reputation: 891
How can I merge individual selected PDF files into one PDF upon download?
I want to achieve the following: http://annualreport2010.landsecurities.com/create-your-own-report.aspx
Do I require an ASP website, or could I do something similar using a static HTML site?
Upvotes: 6
Views: 935
Reputation: 18459
See if itext can help in merging. A quick search gives many links - like Java: Merging multiple PDFs into a single PDF using iText.
Upvotes: 2
Reputation: 5375
Static HTML won't do it.
You need something on the server side. The other answers have options that would work, I just wanted to also mention pdftk, which you could then call from the server side. Be sure to escape all file names and such, though, because you would have to use system calls.
pdftk is really easy. The very first example from their documentation shows how to merge several PDFs, named 1.pdf, 2.pdf and 3.pdf, into one PDF called 123.pdf:
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
For PHP, there even is pdftk-php, if you want to look into that.
Upvotes: 5
Reputation: 24686
I think that the Apache PDFBox project can be good for you.
In particular, take a look at the PDFMerger class.
You can also use iText but in my opinion it's less easy to use.
Upvotes: 2
Reputation: 16516
You can find Source code for PDF split and Merge Source forge PDF SAM
Upvotes: 0
Reputation:
There is a Java PDF merging software at http://codesforus.blogspot.com/.
p.s. They link to this download page: http://messiahpsychoanalyst.org/Documents/Downloads.html#part1
Upvotes: 0