Error: For PDF/A-1a, all fonts, even the base 14 fonts, have to be embedded! Offending font: /Times-Roman

0
Trying to force pdf creation PDF/A-1a with fop wonfiguration. Unfortunately PDF/A-1a requires font to be defined too. So I wrote this (and put the font in the same /resources together with fop.xconf):   <?xml version="1.0"?> <fop version="1.0">   <base>.</base>   <source-resolution>72</source-resolution>   <target-resolution>72</target-resolution>   <renderers>     <renderer mime="application/pdf">     <pdf-a-mode>PDF/A-1a</pdf-a-mode>       <version>1.4</version>       <filterList>         <value>flate</value>       </filterList>       <fonts>         <font kerning="yes" embed-url="Melior.ttf" embedding-mode="full">             <font-triple name="Melior" style="normal" weight="normal"/>         </font>         <font kerning="yes" embed-url="Helvetica.ttf" embedding-mode="full">             <font-triplet name="helvetica" style="normal" weight="normal"/>             <font-triplet name="helveticaMT" style="normal" weight="normal"/>         </font>         <font kerning="yes" embed-url="Helvetica-Bold.ttf" embedding-mode="full">             <font-triplet name="helvetica" style="normal" weight="bold"/>             <font-triplet name="helveticaMT" style="normal" weight="bold"/>         </font>         <font kerning="yes" embed-url="helvetica-light-587ebe5a59211.ttf" embedding-mode="full">             <font-triplet name="helvetica" style="italic" weight="normal"/>             <font-triplet name="helveticaMT" style="italic" weight="normal"/>         </font>         <font kerning="yes" embed-url="Helvetica-Oblique.ttf" embedding-mode="full">             <font-triplet name="helvetica" style="italic" weight="bold"/>             <font-triplet name="helveticaMT" style="italic" weight="bold"/>         </font>             <font kerning="yes" embed-url="times-new-roman.ttf" embedding-mode="full">             <font-triplet name="times-roman" style="normal" weight="normal"/>             <font-triplet name="times-romanMT" style="normal" weight="normal"/>         </font>         <font kerning="yes" embed-url="times-new-roman-bold.ttf" embedding-mode="full">             <font-triplet name="times-roman" style="normal" weight="bold"/>             <font-triplet name="times-romanMT" style="normal" weight="bold"/>         </font>         <font kerning="yes" embed-url="times-new-roman-italic.ttf" embedding-mode="full">             <font-triplet name="times-roman" style="italic" weight="normal"/>             <font-triplet name="times-romanMT" style="italic" weight="normal"/>         </font>         <font kerning="yes" embed-url="times-new-roman-bold-italic.ttf" embedding-mode="full">             <font-triplet name="times-roman" style="italic" weight="bold"/>             <font-triplet name="times-romanMT" style="italic" weight="bold"/>         </font>       </fonts>     </renderer>     <renderer mime="application/postscript">     </renderer>     <renderer mime="application/vnd.hp-PCL">     </renderer>     <renderer mime="image/svg+xml">       <format type="paginated"/>       <link value="true"/>       <strokeText value="false"/>     </renderer>     <renderer mime="application/awt">     </renderer>     <renderer mime="image/png">     </renderer>     <renderer mime="image/tiff">     </renderer>     <renderer mime="text/xml">     </renderer>     <renderer mime="text/plain">       <pageSize columns="80"/>     </renderer>   </renderers> </fop> I get this error: com.mendix.modules.microflowengine.MicroflowException: For PDF/A-1a, all fonts, even the base 14 fonts, have to be embedded! Offending font: /Times-Roman Any ideas?
asked
3 answers
0

Below is a setup of a custom font I used in combination with PDF/A enabled. The fonts are located in the mendix resource folder.
Otherwise increasing the log level of the DocumentExporter lognode, might give you extra information.

Fopx.conf

Resource folder

Font family triplet when viewing the font.

 

answered
0

Thanks Nils. That log node showed me that my definition of Melior was ignored and any, normal, 400 was used instead which was leading to looking for Helvetica or Times-Roman.

As soon as I added that missing -t on triplet definition of Melior that was solved (so I removed the Helvetica and Times-Roman definitions), but I got another error:

com.mendix.modules.microflowengine.MicroflowException: Index 11823 out of bounds for length 215

Which I can't explain, based on my data and code.

It only works if I change the embedding-mode to “auto” instead of “full”. I wonder if that will come back and haunt me in the future.

answered
0

Absolutely nothing. Pretty simple template just to test the PDF/A-1a generation

answered