You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Emily Vorderwülbeke <vo...@fim.uni-passau.de> on 2023/12/13 22:30:51 UTC

Could not load font file

Hei,

I've been trying to write text into a pdf using PdfBox 3.0.1. on macOS 
14.1. When setting the value of a PDField I always get the following 
exception:

Could not load font file: /System/Library/Fonts/LastResort.otf 
java.io.IOException: Invalid character code 0xD800

After that some warnings appear, with more font files which can not be found

Format 14 cmap table is not supported and will be ignored
The expected SubstFormat for ExtensionSubstFormat1 subtable is 4 but 
should be 1
The expected SubstFormat for ExtensionSubstFormat1 subtable is 0 but 
should be 1
Format 14 cmap table is not supported and will be ignored
The expected SubstFormat for ExtensionSubstFormat1 subtable is 4 but 
should be 1
The expected SubstFormat for ExtensionSubstFormat1 subtable is 0 but 
should be 1
Unknown substFormat: 0
Format 14 cmap table is not supported and will be ignored

Even when I try to set the font of a PDPageContentStream in another 
example to Helvetica the same problems occur.

What exactly is going on here? As far as I know all the missing fonts 
are intalled on my Laptop.

Thanks for any help.

Best,
Emily

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Could not load font file

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

The "SubstFormat" bug is not really important because it doesn't abort, 
the "Format 14 cmap table" isn't really a bug, there are usually several 
tables.
Please try a snapshot version, the "SubstFormat" bug has been fixed:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/3.0.2-SNAPSHOT/

However I'm wondering why "LastResort.otf" fails. Could you upload that 
one somewhere? And also post the full stack trace?

Tilman

On 13.12.2023 23:30, Emily Vorderwülbeke wrote:
> Hei,
>
> I've been trying to write text into a pdf using PdfBox 3.0.1. on macOS 
> 14.1. When setting the value of a PDField I always get the following 
> exception:
>
> Could not load font file: /System/Library/Fonts/LastResort.otf 
> java.io.IOException: Invalid character code 0xD800
>
> After that some warnings appear, with more font files which can not be 
> found
>
> Format 14 cmap table is not supported and will be ignored
> The expected SubstFormat for ExtensionSubstFormat1 subtable is 4 but 
> should be 1
> The expected SubstFormat for ExtensionSubstFormat1 subtable is 0 but 
> should be 1
> Format 14 cmap table is not supported and will be ignored
> The expected SubstFormat for ExtensionSubstFormat1 subtable is 4 but 
> should be 1
> The expected SubstFormat for ExtensionSubstFormat1 subtable is 0 but 
> should be 1
> Unknown substFormat: 0
> Format 14 cmap table is not supported and will be ignored
>
> Even when I try to set the font of a PDPageContentStream in another 
> example to Helvetica the same problems occur.
>
> What exactly is going on here? As far as I know all the missing fonts 
> are intalled on my Laptop.
>
> Thanks for any help.
>
> Best,
> Emily
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org