Elektrine lite

← Feed

@BertrandCaron@digipres.club

Post #1793964

2026-04-24 16:26 UTC

soooo... this happens when there is no /FontDescriptor object associated with a Font object in a PDF. Not only the font is not embedded, but in addition, the font's characteristics (ascent, descent, bounding box - i.e., the size of the largest rectangle that a character would fill -, italic angle, etc.) are not known. These are important for the viewer to choose the most suitable replacement font.

Replies (1)

  • @BertrandCaron@digipres.club 2026-04-24 16:31

    Fortunately, the /Font object specifies the font name: Open-Sans, which is an extremely common font distributed by Google. So we can make sure the font is installed on our machine (on Linux: sudo apt install fonts-open-sans) then run Ghostscript to re-write the PDF and embed the font: gs -o fixed.pdf \ -sDEVICE=pdfwrite \ -dEmbedAllFonts=true \ -dSubsetFonts=true \ -sFONTPATH="/usr/share/fonts/truetype/open-sans" \ corrupted.pdf

    Open ##1793965