wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes Java API to convert editable PDF to non-editable PDF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java API to convert editable PDF to non-editable PDF" Watch "Java API to convert editable PDF to non-editable PDF" New topic
Author

Java API to convert editable PDF to non-editable PDF

Ruth Ambika
Greenhorn

Joined: Feb 16, 2010
Posts: 5
Hi All,

I would like to know is there any Java API is available to convert editable PDF to non-editable PDF online. We have a client application where we need to fetch the editable PDF from backend and display as non-editable PDF in UI. Appreciate your help.

Thanks in advance!
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
iText can do this, somewhat like this:

This code is for iText 2, the API may have changed in iText 5, but should be similar. Instead of "PdfWriter.AllowPrinting" you could use a combination of other options (or none at all, meaning 0), depending on what you want the user to be able to do with the document.
Ruth Ambika
Greenhorn

Joined: Feb 16, 2010
Posts: 5
Thanks Tim.!!! It works..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java API to convert editable PDF to non-editable PDF
 
Similar Threads
Converting non-editable pdfs to editable pdfs
convert pdf to word using java.
ascii to pdf
iText for editable pdf
Convert Editable Pdf into Non-Editable Pdf