wood burning stoves 2.0*
The moose likes Java in General and the fly likes Converting HTML to PDF and merging PDFs using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Converting HTML to PDF and merging PDFs using Java" Watch "Converting HTML to PDF and merging PDFs using Java" New topic
Author

Converting HTML to PDF and merging PDFs using Java

amar mahtani
Greenhorn

Joined: Feb 08, 2009
Posts: 7
Hi, I have a set of HTML files which has links pointing to one another and also pointing to a set of PDF files.

Folder Structure

../HTML/*.html
../PDF/*.pdf
also
../PDF/SubFolder1/Sub1.1/*.pdf
../PDF/SubFolder1/Sub1.2/*.pdf

I would like to know, if its possible to convert and merge all these files into one single PDF and have the newly converted HTML files retain their link destination to the various PDF files and HTML files.

This task is possible with the Acrobat Professional tool, where in we select Create PDF from web page and select the option to get Entire Site, so this way all the HTML files and their link destination files (i.e. other HTML files and PDF files) are included in the newly created single PDF File.

I have tried using iText, but it does not retain the link destinations correctly, in that it still thinks the link is a web link instead of a normal pdf bookmark or a pdf link. Any help from you would be really appreciated, Thank you.

Regards,
Amar Mahtani
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Converting HTML to PDF and merging PDFs using Java
 
Similar Threads
Does anyone solved ICE Test 286, 287 100% ?
HTML to PDF Conversion using Java
157 Question Help and Resourses
IBM Exam 157 - Questions and Answers (Sample Exam)
ICE Test 286 solved 89 %