Forum How do I...?

How to use Distiller to produce linearized doc

mischor
After processing with PrinceXML, we're finding that the resulting pdf is much larger than our previous process, which was producing linearized PDFs.

The PrinceXML documentation says:

Prince compresses its PDF output to reduce the size of the documents that it produces. Prince does not create linearized PDF files, as this would increase formatting time and memory requirements. An external program such as Adobe Distiller or Ghostscript may be used for this purpose if necessary.


I have Adobe Distiller. It doesn't take as input the output of PrinceXML (a PDF file) however. How do I use it to reduce the size of my file?

-Marshall Schor
mikeday
Sorry, this documentation is incorrect: it should refer to Adobe Acrobat and not Adobe Distiller.

If you select "PDF Optimizer" which is under the Advanced menu (or alternatively under Tools -> Print Production), you will find a number of options for reducing PDF file size. It also has some diagnostics so that you can see whether fonts or images or other things are taking up the most space.

However, if your PDF files are relatively small (ie. under 10 pages) and don't have high resolution images, then the bulk of the file size is almost certainly embedded fonts. You can test this by running Prince from the command-line with the --no-embed-fonts option and checking the output file size.

Best regards,

Michael
mischor
Hmmm - I have Acrobat Standard version 6.0. It doesn't have those menu options...

You mention also that ghostscript can reduce the size? Can you say more about that?

-Marshall
mikeday
Hmmm - I have Acrobat Standard version 6.0. It doesn't have those menu options...

I think that Acrobat Professional is required for this functionality.

You mention also that ghostscript can reduce the size? Can you say more about that?

Well, ghostscript includes a program called "pdfopt", which performs PDF linearization. However, this may not reduce the size of the PDF much, as linearization is primarily used to allow faster access to portions of a PDF file, for example when browsing a large PDF file online over a slow connection.

I strongly recommend disabling font embedding in Prince and seeing what effect it has on your PDF file size. If the fonts are very large but you are only using portions of them, for example many East Asian fonts, then the situation could be improved by font subsetting, which will be supported in a future release of Prince.
Lynx
If the fonts are very large but you are only using portions of them, for example many East Asian fonts, then the situation could be improved by font subsetting, which will be supported in a future release of Prince.

That would be great :)
mischor
Ghostscript was able to reduce the size of my PDF considerably, by compressing the images.

The format of the call I used was:
gswin32c -sDEVICE=pdfwrite -dNOPAUSE -dPDFSETTINGS=/ebook -sOutputFile=c:\temp\out.pdf inputFileName.pdf


Thanks for pointing me in this direction!

-Marshall Schor
mikeday
Prince now includes support for TrueType font subsetting, which can greatly reduce the size of generated PDF files when many embedded fonts are in use.