How can I write java program to concatenate or merge two pdf files into one? Can I do this using just java or need to use any third party software? If it is not possible, what is the free softwares available for this purpose? Thanks in advance.
Rizwan
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
posted
0
There is a nice set of libraries called iText that you can use to read and write PDFs. There is also a nice package called pdftk that you can use to manipulate PDFs.
Rizwan Mohammad
Ranch Hand
Joined: Sep 02, 2005
Posts: 445
posted
0
Thanks Keith. I will go through those site and I know about them earlier. I dont want to read or write pdfs.. I have all the pdfs and just I have to merge them into one.. Is it possible without them or will there be some functions in those api's to do this job?
Originally posted by Rizwan Mohammad: Thanks Keith. I will go through those site and I know about them earlier. I dont want to read or write pdfs.. I have all the pdfs and just I have to merge them into one.. Is it possible without them or will there be some functions in those api's to do this job?
There are ways in both iText and pdftk. pdftk is probably easier to use for it since it is a command line program and you simply feed in the names of the .pdf files that you want to merge.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35247
7
posted
0
iText also comes with a ready-to-use example program that shows how to concatenate files.
Ulf & Keith, Thanks for your solutions. These helped me a lot.
Megan James
Greenhorn
Joined: Nov 21, 2008
Posts: 11
posted
0
Could any one know how read the pdf with font style, family and size for each and every word or line?.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35247
7
posted
0
Vijay,
your question has nothing to do with what was discussed above. Please don't post unrelated questions into existing topics; that's called "hijacking" and is frowned upon. Please start a new thread instead.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.