Apache™ FOP: PDF Images Plug-In
Overview
Thefop-pdf-images plug-in extends FOP in order to add support for using PDF images in fo:external-graphic elements whengenerating PDF files. This means one can write something like:
<fo:external-graphicsrc="my-doc.pdf#page=1"/>
and
<fox:external-documentsrc="my-doc.pdf"/>
Reduce file size
If you input many pdfs together the output pdf has duplicate fonts. Set this flag to merge fonts in fop.xconf:
<renderermime="application/pdf"><merge-fonts>true</merge-fonts></renderer>
Object Streams compress the PDF to reduce file size. Needs to be enabled using fop.xconf:
<renderermime="application/pdf"><use-object-streams>true</use-object-streams></renderer>
Improve performance
If you use many of the same pdf's and they have a large content stream, this flag can improve performance.The disadvantage will be it can cause higher memory use inside your printer.Set this flag in fop.xconf:
<renderermime="application/pdf"><form-xobject>true</form-xobject></renderer>
Merge form fields
If you want to merge form fields data structure across multiple input pdfs set this flag in fop.xconf:
<renderermime="application/pdf"><merge-form-fields>true</merge-form-fields></renderer>
Known issues with Postscript output
- If fonts are not embedded in source PDF:
- If OTF font type is needed text may be missing if Adobe Reader fonts are not found
- Text may be rendered wrong or poorly if wrong font is selected as replacement
- Transparency, layers and opacity may not render correctly
- Gradients in text may be different from the source PDF
Binary Download
If using the binary package, the four jar files should be placed in thelib directory of your FOP installation.
Binary distributions include "-bin" in their names, and can be downloaded from aFOP-PDF-Images Distribution mirror.
Here are the links to each package’s signature and checksum files. Signatures can be verified by using ourKEYS file.
Source Download
Older Releases
Archive distributions can be downloaded from the archivesbinaries &source links.
The fop-pdf-images plug-in was donated by Jeremias Märki to the XMLGraphics project in 2012. Older releases canbe obtained from his plug-inpage.
History of Changes
Version 2.11
- FOP-3203: Upgrade to PDFBox 3
- FOP-3210: Correct position when merging pdfs
- FOP-3213: Sort dict hash to find more duplicates
- FOP-3227: Draw softmask without rasterizing page
- FOP-3230: Fix PDF/UA compliance issues when attaching a PDF/UA file
- FOP-3233: Avoid merging fonts without mac cmap
- FOP-3234: Use unique value for glyph index for font merging
- FOP-3235: Correct PS transform for gradients and mask for images
- FOP-3237: Use DPI to set resolution of PDFBox images
- FOP-3240: Use glyph from fonts where is exists for font merge
Version 2.10
- FOP-3149: Don't merge fonts when ascent is different
- FOP-3155: Use format 12 for unicode cmap
- FOP-3158: Switch to spotbugs
- FOP-3183: Disable pattern modification using xobjforms
- FOP-3200: Correct end of start code for merging ttf cmap
Version 2.9
- FOP-3107: Update to PDFBox 2.0.27
- FOP-3108: Gradient component not displayed correctly after scaling
- FOP-3112: Rotate annotations
- FOP-3123: Modified stream should be used in the cache key
- FOP-3124: Subrs data missing from font merging
- FOP-3136: Softmask dictionary preserved
- FOP-3138: NPE when no fields
- FOP-3140: Merge form fields
Version 2.8
- FOP-3051: Upgrade to Commons IO 2.11
- FOP-3073: Preserve bytes when cloning string
- FOP-3089: Switch cmap format to support iPhone
- FOP-3102: Move composite glyphs to the end
Version 2.7
- FOP-3034: Update PDFBox to 2.0.24
- FOP-3032: Allow to embed native PDF in AFP
- FOP-3020: Add space to standard position for font merge
- FOP-3009: Avoid merging fonts with different number of cmap formats
- FOP-3001: Deduplicate streams in arrays
Version 2.6
- FOP-2951: Add uniquename to xobj form
- FOP-2965: Keep streams with DCT compression
- FOP-2971: Update unique name inside patterns
- FOP-2974: Handle space in COSName
- FOP-2979: Update PDFBox to 2.0.19
Version 2.5
- FOP-2904: Handle object for boundingbox
- FOP-2922: Syntax error after writing content stream
- FOP-2933: PDF to PDF checkbox missing
Version 2.4
- FOP-2802: Java 10 PDF/SVG to Image box not shown
- FOP-2812: Update PDFBox to 2.0.11
- FOP-2836: Update PDFBox to 2.0.13
- FOP-2840: Image mask in PDF not rendered to PS
- FOP-2841: PDF to PDF with merge-fonts checkbox misaligned
- FOP-2856: Support compile on Java 12
- FOP-2873: Update to PDFBox 2.0.16
- FOP-2879: Add caching to avoid parsing content stream
- FOP-2882: Allow PDFFormXObject to improve performance
Version 2.3
- PDF to PDF deduplicate more types of streams
- PDF to PS allow fop fonts as fallback
Version 2.2
- Move to PDFBox 2
- Deduplicate PDF streams
- PDF to PS deduplication of images
- Remove xobj type=form
- Merge fonts (off by default)
- Support PDF shading to PS
- Merging of Tagged (Accessible) PDF