0

I try to create a factur-X PDF, I use https://services.fnfe-mpe.org/ to audit my pdf to test validity of those. I have this error :

Spec. ISO_19005_3 clause 6.2.11.5 For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded font program shall be consistent. Level: CosDocument

Context:
root/document[0]/pages[0](3 0 obj PDPage)/contentStream[0](4 0 obj PDContentStream)/operators[9]/xObject[0](5 0 obj PDXForm)/contentStream[0](5 0 obj PDContentStream)/operators[2027]/usedGlyphs[0](TimesNewRomanNormal 32 0 0)
root/document[0]/pages[0](3 0 obj PDPage)/contentStream[0](4 0 obj PDContentStream)/operators[9]/xObject[0](5 0 obj PDXForm)/contentStream[0](5 0 obj PDContentStream)/operators[2001]/usedGlyphs[0](TimesNewRomanNormal 15 0 0)
root/document[0]/pages[0](3 0 obj PDPage)/contentStream[0](4 0 obj PDContentStream)/operators[9]/xObject[0](5 0 obj PDXForm)/contentStream[0](5 0 obj PDContentStream)/operators[2017]/usedGlyphs[0](TimesNewRomanNormal 8 0 0)
root/document[0]/pages[0](3 0 obj PDPage)/contentStream[0](4 0 obj PDContentStream)/operators[9]/xObject[0](5 0 obj PDXForm)/contentStream[0](5 0 obj PDContentStream)/operators[1507]/usedGlyphs[0](TimesNewRomanNormal 59 0 0)
root/document[0]/pages[0](3 0 obj PDPage)/contentStream[0](4 0 obj PDContentStream)/operators[9]/xObject[0](5 0 obj PDXForm)/contentStream[0](5 0 obj PDContentStream)/operators[1172]/usedGlyphs[0](TimesNewRomanNormal 22 0 0)

PDF File example

I try to use OpenType font (.otf) but the problem persist.

I try to set all text with same font size and same font-width but the problem persist. Thank you for your help

LoickMEYER
  • 50
  • 2
  • 14
  • 2
    How do you create your PDFs? The error message says that the widths information in the embedded font files differs from the widths in the PDF font dictionaries. This is not related to the font size, so your attempt to *set all text with same font size and same font-width* is bound to fail. – mkl May 18 '23 at 17:23
  • @mkl I create my PDFs with wkhtmltopdf, I don't understand why the widths are different? Thanks for your help – LoickMEYER May 18 '23 at 20:09
  • 2
    *"I create my PDFs with wkhtmltopdf, I don't understand why the widths are different? Thanks for your help"* - Possibly a bug in wkhtmltopdf. – mkl May 18 '23 at 22:31
  • 1
    It might be helpful to provide a sample document so that we can verify that the error you're getting is actually correct. It would also be useful to run your test while using a different font; perhaps an OpenType font if you're currently using TrueType. – David van Driessche May 19 '23 at 16:19
  • Hi @DavidvanDriessche Thanks for your help, I try to use OpenTYpe font (Helvetica with the .otf extension) but the problem persist. I've edited my question to add sample document. – LoickMEYER May 30 '23 at 07:08
  • Did you try with a PDF not generated by wkhtmltopdf? – Olivier Jun 03 '23 at 11:30

0 Answers0