Java PDF Conversion Options

Written on 7:59 AM by ronald

I was assigned with the task of looking for API that will do the conversion from word, rtf or html to PDF and after some researches these are the options i can think of

Choice 1 :
Install OpenOffice in server to do conversion from word to pdf

Pros :
Easy to implement, compatiblity is good

Cons :
Dependency on OpenOffice
Security concern regarding installation of extra software


Choice 2 :
Online HTML editor to do the customization and then convert from HTML to PDF

Pros :
Quite customizable, user can change the in the system directly

Cons :
Rejected because might have cross site scripting issue
Additional javascript coding effort
No easy way to convert from html to pdf

Choice 3 :
Client side do conversion to PDF
system will only read the uploaded pdf file and do the replacement of placeholder with the actual values and generate the output PDF

Pros :
Discrepancy of the outlook of the generated PDF will be minimial

Cons :
Currently iText or other java APIs can only read in PDF as bytes. And there is a lot of effort trying to preserve the original formatting after replacing the placeholder values and then regnerating the output PDF.

I wonder if there is any other options. For now we are more of using option 2

If you enjoyed this post Subscribe to our feed

No Comment

Post a Comment