The Apache FOP Project

The Apache™ FOP Project

Apache™ FOP: PDF/X (ISO 15930)

Overview

Support for PDF/X is available beginning with version 0.93. This feature is new and may not be 100% complete, yet. Feedback is welcome.

PDF/X is a standard which faciliates prepress digital data exchange using PDF. Currently, PDF/X-3:2003 and PDF/X-4 are implemented out of the many different flavours of PDF/X profiles. PDF/X-3:2003 is documented in ISO 15930-6:2003(E). More info on PDF/X can be found on the PDF/X info site.

Implementation Status

PDF/X-3:2003 and PDF/X-4 are implemented to the degree that FOP supports the creation of the elements described in ISO 15930-6.

An important restriction of the current implementation is that all normal RGB colors specified in XSL-FO and SVG are left unchanged in the sRGB color space (XSL-FO and SVG both use sRGB as their default color space). There's no conversion to a CMYK color space. Although sRGB is a calibrated color space, its color space has a different size than a CMYK color space which makes the conversion a lossy conversion and can lead to unwanted results. Although the use of the calibrated sRGB has been promoted for years, print shops usually prefer to convert an sRGB PDF to CMYK prior to production. Until there's full CMYK support in FOP you will have to work closely with your print service provider to make sure you get the intended result.

Tests have been performed against Adobe Acrobat 7.0.7 (Preflight function). Note that there are bugs in Adobe Acrobat which cause false alarms if both PDF/A-1b and PDF/X-3:2003 are activated at the same time.

Usage (command line)

To activate PDF/X-3:2003 from the command-line, specify "-pdfprofile PDF/X-3:2003" as a parameter. If there is a violation of one of the validation rules for PDF/X, an error message is presented and the processing stops.

Usage (fop.xconf)

<renderers>
 <renderer mime="application/pdf">
  <pdf-x-mode>PDF/X-3:2003</pdf-x-mode>
  <output-profile>USSheetfedCoated.icc</output-profile>
  <fonts>
    <font kerning="yes" embed-url="Arial.ttf">
      <font-triplet name="Arial" style="normal" weight="normal"/>
    </font>
  </fonts>
 </renderer>
</renderers>

Add document title to fo:

<fo:declarations>
 <x:xmpmeta xmlns:x="adobe:ns:meta/">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
      <dc:title>Document title</dc:title>
      <dc:creator>Document author</dc:creator>
      <dc:description>Document subject</dc:description>
    </rdf:Description>
  </rdf:RDF>
 </x:xmpmeta>
</fo:declarations>

Usage (embedded)

When FOP is embedded in another Java application you can set a special option on the renderer options in the user agent to activate the PDF/A-1b profile. Here's an example:

FOUserAgent userAgent = fopFactory.newFOUserAgent();
userAgent.getRendererOptions().put("pdf-x-mode", "PDF/X-3:2003");
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
[..]

If one of the validation rules of PDF/X is violated, an PDFConformanceException (descendant of RuntimeException) is thrown.

PDF/X in Action

There are a number of things that must be looked after if you activate a PDF/X profile. If you receive a PDFConformanceException, have a look at the following list (not necessarily comprehensive):

PDF profile compatibility

The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" are compatible and can both be activated at the same time.

PDF/VT (ISO 16612-2)

Professional printers can use PDFVT to control things like what printer tray is used. Image XObjects have UUID added to enable caching in printer.

Usage (fo)

Add metadata for each page master based on how the printer has been configured.

<fo:simple-page-master master-name="simple" page-height="27.9cm" page-width="21.6cm">
  <fo:region-body />
   <pdf:vt>
    <pdf:dictionary key="DPM/CIP4_Root/CIP4_Production/CIP4_Part">
        <pdf:string key="CIP4_ProductType">frontpages</pdf:string>        
    </pdf:dictionary> 
  </pdf:vt>          
</fo:simple-page-master>

Usage (fop.xconf)

Enable PDF/VT-1 and PDF/X-4 in fop.xconf:

<renderer mime="application/pdf">
  <pdf-x-mode>PDF/X-4</pdf-x-mode> 
  <pdf-vt-mode>PDF/VT-1</pdf-vt-mode>
  <output-profile>ISOcoated_v2_300_bas.icc</output-profile>
  <fonts>
    <font kerning="yes" embed-url="arial.ttf">
      <font-triplet name="Arial" style="normal" weight="normal"/>
    </font>
  </fonts>
</renderer>