I am trying to validate a PDF file as part of IngramSpark's pre-publishing workflow. I upload the final PDF to be published, and their software (which I believe is pdfToolbox from Callas) runs a "preflight" check on the PDF.
I get this error message: The 'Widths' array in a font has an invalid length
... but no advice on how to solve this.
Since I don't have access to pdfToolbox to run the preflight checks on my own, I have used VeraPDF (open source) to check the PDF. I am able the replicate the error in VeraPDF. When checking the PDF, VeraPDF provides a more detailed error message, as follows:
And here is the text of the error message:
root/document[0]/pages[0](1 0 obj PDPage)/contentStream[0](2 0 obj PDContentStream)/operators[42]/font0
Widths array is missing or has invalid size 105 instead of 106
root/document[0]/pages[1](8 0 obj PDPage)/contentStream[0](9 0 obj PDContentStream)/operators[10]/font0
Widths array is missing or has invalid size 80 instead of 81
root/document[0]/pages[11](38 0 obj PDPage)/contentStream[0](39 0 obj PDContentStream)/operators[66]/font0
Widths array is missing or has invalid size 51 instead of 52
=== end of VeraPDF error
So this error refers to a missing Widths array in two different fonts: EBGaramond-Regular (mentioned twice) and EBGaramond-Italic.
Here is what I have tried, without success:
- I have used the Google ttf (TrueType) version of these fonts: https://fonts.google.com/specimen/EB+Garamond
- I have embedded these fonts in the PDF.
- I have used the otf (OpenType) version of these fonts.
- I have Googled this error message and found a similar complaint, but without any solution: https://community.adobe.com/t5/acrobat-discussions/acrobat-preflight-reports-the-quot-widths-quot-array-in-a-font-has-an-invalid-length/td-p/11580976
Any suggestions for a fix?
Just for reference, here are possible solutions that I have pondered:
Is the missing Widths array intrinsic to the EBGaramond-Regular and EBGaramond-Italic, and therefore unfixable, so I should try a different font?
Could the font files be edited to fix the missing Widths array?
Could the PDF file be edited to fix the missing Widths array?
Have I somehow embedded the fonts improperly in the PDF?
This bug was introduced in LibreOffice 7.5 in https://gerrit.libreoffice.org/c/core/+/140125; and fixed in LibreOffice 7.6.2 in tdf#157112.