JV10
JV10

Reputation: 891

How can I merge individual selected PDF files into one PDF upon download?

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

Answers (5)

Jayan
Jayan

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

Christian Neverdal
Christian Neverdal

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

davioooh
davioooh

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

Chandra Sekhar
Chandra Sekhar

Reputation: 16516

You can find Source code for PDF split and Merge Source forge PDF SAM

Upvotes: 0

user649198
user649198

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

Related Questions