Here are several recommendations to reduce the PDF document size:
- Try using Adobe Standard Fonts instead of their Windows counterparts. That is, use Helvetica instead Arial, Times instead of Times New Roman and Courier instead of Courier New. Adobe Standard Fonts are never embedded because they are guaranteed to be recognized by every piece of software able to work with PDF files.
You can also use our xf:pdf-page-settings special extension, which will allow you to disable the embedding of any font information (applicable for TTF fonts only). You will have to insert the following line at the beginning of the template, right after the <xfd:document> element: <xf:pdf-page-settings embed-true-type-fonts="false"/>
You can read more about this extension in the following documentation page:
- Try using images with a lower resolution. If possible, use JPEG images or set the image compression mode to JPEG, see:
- Optimize your template
For best practices, make sure that your template has the simplest layout possible:
- as little nested tables as possible
- correct, logical order for elements (an <fo:inline> should not contain an <fo:table> element, for example)
- avoid using "auto" values to set widths and heights or table layouts, as it takes more time to process such requests rather than having an exact size for various elements.
- Adjust the image's DPI by using a resampling resolution on the image. This can be done by setting the attribute xf:filter="resample(70)" on the fo:external-graphic element.
We also offer professional services to help people to optimize their templates and rendering process if they are interested.