Ok, I guess I need to prefilter the strings. However I can't seem to find any reference to what characters are invalid in all pdf fonts.
Is there a way to query for what glyphs are included in the font? On 19 June 2015 at 15:07, John Hewson <[email protected]> wrote: >> On 16 Jun 2015, at 21:17, Torgeir Veimo <[email protected]> wrote: >> >> Am trying out PDFBox 2.0.0-SNAPSHOT to get PDF embedding working, but >> am getting exceptions with normal font routines. >> >> On the string >> "fagområder som: • skatterådgivning • regnskapsrådgivning • >> generasjonsskifte • selskapsstiftelse og omdanning • verdivurdering • >> opplegg av bedriftens interne organisasjon • undervisning •" >> >> I'm getting java.lang.IllegalArgumentException: No glyph for U+2028 in >> font Lato-MediumItalic. > > U+2028 is a line separator, which isn't supported by showText(). > >> Wouldn't it be more appropriate to assume missing glyphs have zero >> width? Is there a way to prevent this from happening? > > Missing glyphs are going to appear in a PDF as an outlined rectangle, which > is almost certainly not what you want. We throw an error rather than > generating a bad PDF. > > You need to handle the line breaking yourself and/or use a font which > provides a glyph for U+2028. > > -- John > >> -- >> -Tor >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- -Tor --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

