我正在努力使用 Apache FOP 0.95 生成符合 PDF/A-1b 的文档。使用 fop 生成没有异常,但是当我使用预检工具在 Adobe Acrobat XI 中对其进行验证时,出现以下错误。
PDF 文档不符合 PDF/A-1b 子集字体中的 CIDset 不完整
我已经知道我必须嵌入所有字体而不仅仅是子集,但我不知道该怎么做。
这是我的配置文件
<!-- Strict user configuration -->
<strict-configuration>true</strict-configuration>
<!-- Strict FO validation -->
<strict-validation>false</strict-validation>
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
<source-resolution>72</source-resolution>
<!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
<target-resolution>150</target-resolution>
<!-- Default page-height and page-width, in case
value is specified as auto -->
<default-page-settings height="11in" width="8.26in"/>
<!-- Information for specific renderers -->
<!-- Uses renderer mime type for renderers -->
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="yes" embed-url="fonts095/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
<font kerning="yes" embed-url="fonts095/ariali.ttf" >
<font-triplet name="Arial" style="italic" weight="normal"/>
</font>
<font kerning="yes" embed-url="fonts095/arialbd.ttf" >
<font-triplet name="Arial" style="normal" weight="bold"/>
</font>
<font kerning="yes" embed-url="fonts095/arialbi.ttf" >
<font-triplet name="Arial" style="italic" weight="bold"/>
</font>
<font kerning="yes" embed-url="fonts095/cour.ttf" >
<font-triplet name="CourierNew" style="normal" weight="normal"/>
<font-triplet name="Courier" style="normal" weight="normal"/>
</font>
<font kerning="yes" embed-url="fonts095/couri.ttf" >
<font-triplet name="CourierNew" style="italic" weight="normal"/>
<font-triplet name="Courier" style="italic" weight="normal"/>
</font>
<font kerning="yes" embed-url="fonts095/courbd.ttf" >
<font-triplet name="CourierNew" style="normal" weight="bold"/>
<font-triplet name="Courier" style="normal" weight="bold"/>
</font>
<font kerning="yes" embed-url="fonts095/courbi.ttf" >
<font-triplet name="CourierNew" style="italic" weight="bold"/>
<font-triplet name="Courier" style="italic" weight="bold"/>
</font>
<font kerning="yes" embed-url="fonts095/times.ttf" >
<font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
<font-triplet name="Times" style="normal" weight="normal"/>
</font>
<font kerning="yes" embed-url="fonts095/timesi.ttf" >
<font-triplet name="TimesNewRoman" style="italic" weight="normal"/>
<font-triplet name="Times" style="italic" weight="normal"/>
</font>
<font kerning="yes" embed-url="fonts095/timesbd.ttf" >
<font-triplet name="TimesNewRoman" style="normal" weight="bold"/>
<font-triplet name="Times" style="normal" weight="bold"/>
</font>
<font kerning="yes" embed-url="fonts095/timesbi.ttf" >
<font-triplet name="TimesNewRoman" style="italic" weight="bold"/>
<font-triplet name="Times" style="italic" weight="bold"/>
</font>
</fonts>
<!-- This option lets you specify additional options on an XML handler -->
<!--xml-handler namespace="http://www.w3.org/2000/svg">
<stroke-text>false</stroke-text>
</xml-handler-->
</renderer>
</renderers>
谢谢大家的建议,但不要建议我升级 fop。在不久的将来,这对我来说是不可能的。