You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/02/01 03:56:52 UTC

[jira] [Commented] (PDFBOX-3672) Exception on font PDType1Font.ZAPF_DINGBATS

    [ https://issues.apache.org/jira/browse/PDFBOX-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847940#comment-15847940 ] 

Tilman Hausherr commented on PDFBOX-3672:
-----------------------------------------

I tried to recreate your exception and I could by passing a "T". That can't work. See Annex D.6 in the PDF 32000 specification.
https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
Note that this table doesn't mention the unicode symbols. What works is e.g. "\u27a2" which is a sort of triangle.

What is the parameter that was passed to getStringWidth() ?

> Exception on font PDType1Font.ZAPF_DINGBATS
> -------------------------------------------
>
>                 Key: PDFBOX-3672
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3672
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.4, 2.1.0
>            Reporter: Said Herzallah
>
> Hi
> I am getting this exception using snapshot pdfbox-2.1.0-20170131.210242-692.jar and fontbox-2.1.0-20170131.215925-709.jar
> Debugging PDType1Font.java, the unicode value passed to method "protected byte[] encode(int unicode) throws IOException"  was 84
> and the call to  method "encode(int unicode)" was triggered from font.getStringWidth(...) when font was PDType1Font.ZAPF_DINGBATS
> java.lang.IllegalArgumentException: U+0054 ('.notdef') is not available in this font ZapfDingbats (generic: MS-Gothic) encoding: ZapfDingbatsEncoding
> 	at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:409)
> 	at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:316)
> 	at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:345)
> 	



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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