pdf.accessiblity parameter generates chemistry error

Post here questions and problems related to editing and publishing DITA content.
tanja
Posts: 40
Joined: Tue Oct 30, 2018 10:49 am

pdf.accessiblity parameter generates chemistry error

Post by tanja »

Hi all,

we are using Oxygen XML Editor version 26 to generate PDF output. We activated the pdf.accessiblity parameter and specified the fonts as described in Accessibility.
However, when generating PDFs with monospace fonts, the publishing fails with the following error:

Code: Select all

System ID: C:\dev\projects\DP001\trunk\en-US\maps\pdf\SoftMax_Pro_3_5_Data_Acquisition_Module_User_Guide.ditamap
Scenario: PLA PDF
Input file: C:\dev\projects\DP001\trunk\en-US\maps\pdf\SoftMax_Pro_3_5_Data_Acquisition_Module_User_Guide.ditamap
Engine name: DITA-OT
Severity: error
Description: [CH] Error com.oxygenxml.chemistry.e.fb "FOP stage failed: For PDF/UA-1, all fonts, even the base 14 fonts, have to be embedded! Offending font: /Courier"
URL: https://www.oxygenxml.com/DITA-messages.html#msgs__CH
We tried the following fixes, but the error persists:
  • Specified a 'MonospaceBrandingFont' (comparable to BrandingFont and SecondaryBrandingFont), copied a font file to the publishing folder resources/fonts (the same way as for the other branding fonts), and defined this font for <code> and <pre> elements and all other respective CSS classes. With the pdf.accessibility parameter switched off, the font is successfully used in publishing. With the parameter switched on, the error persitsts.
We did not find a way to place the font files in a folder such that the publishing engine is able to find them.

Could you give us a hint as to how to fix this issue?

Thanks and best regards, Tanja
julien_lacour
Posts: 662
Joined: Wed Oct 16, 2019 3:47 pm

Re: pdf.accessiblity parameter generates chemistry error

Post by julien_lacour »

Hello Tanja,

The problem is that the monospace blocks (like DITA <codeblock> or <codeph>) override the body rule, this is why the error appear.
If you set your custom monospace font for these elements, the problem will disappear:

Code: Select all

*[class ~= "pr-d/codeph"],
*[class ~= "pr-d/codeblock"] {
  font-family: MonospaceBrandingFont, monospace;
}
Regards,
Julien
Post Reply