What is the simplest/fastest option to modify some PDFattributes such as producer, creator, page-mode, linearization?


I am evaluating PDF libraries, I have couple of question about PDFTron. Eventually we would like to integrate with Java SDK, but currently we need a command-line option to update the PDF files

Do you have any command line tool for Windows/Linux to modify a PDF file? If yes, how do I get it.

Mostly we will be modifying 3-6 attributes of pdf file. e.g producer, creato,r page-mode UseOutlines, version and linearization.


You can use PDFNet SDK (http://www.pdftron.com/pdfnet/downloads.html) to implement a command-line utility as shown in one of the provided samples (http://www.pdftron.com/pdfnet/samplecode.html).

For example, please take a look at SDF sample (which is a command-line utility):


This sample is using low-level API to modify some attributes in PDF, but there is also high-level API. The simplest way to access document’s metadata (e.g. author, title, keywords, etc.) is using PDFDocInfo class. For example,

PDFDocInfo info = mydoc.getDocInfo();

string title = info.getTitle();

info.setTitle(“My Title”);


If you don’t have time for any programming you can also use PDF PageMaster CLI (http://www.pdftron.com/pdfpagemaster/downloads.html) to set the required attributes and to linearize files.

For more info please see: http://www.pdftron.com/assets/pdfs/support/PDFTron_PDF_PageMaster_User_Manual.pdf