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 2016/07/09 15:37:11 UTC

[jira] [Commented] (PDFBOX-3395) Throwing exception when PDF has unused empty fonts embedded.

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

Tilman Hausherr commented on PDFBOX-3395:
-----------------------------------------

Please attach a sample file.

> Throwing exception when PDF has unused empty fonts embedded.
> ------------------------------------------------------------
>
>                 Key: PDFBOX-3395
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3395
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>            Reporter: Daniel Persson
>
> I was trying to follow up on the issues in our system and found that some PDF files threw ERRORs. These PDFs are produced by a publishing system and that system seems to add fonts when you change to them and add them even though they are never used. Or only space is used. Then they add this font with an empty glyf table. This results in that errors are thrown on files that are fine.
> Line 310 in TTFParser removes empty glyf tables.
>         // skip tables with zero length
>         if (table.getLength() == 0)
>         {
>             return null;
>         }
>         return table;
> Line 215 of TTFParser throws exception when glyf table is missing.
>             if (font.getGlyph() == null)
>             {
>                 throw new IOException("glyf is mandatory");
>             }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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