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

2016-07-13 Thread John Hewson (JIRA)

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

John Hewson commented on PDFBOX-3395:
-

Excellent.

> 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
>Affects Versions: 2.0.1, 2.0.2, 2.0.3
>Reporter: Daniel Persson
>Assignee: Tilman Hausherr
> Fix For: 2.0.3, 2.1.0
>
>
> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread Daniel Persson (JIRA)

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

Daniel Persson commented on PDFBOX-3395:


Ran some of my test cases and the errors are gone. Now I only have warnings for 
missing Unicode mappings which are unrelated to this issue.

> 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
>Affects Versions: 2.0.1, 2.0.2, 2.0.3
>Reporter: Daniel Persson
> Fix For: 2.0.3, 2.1.0
>
>
> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3395:
-

Ok, the new solution is better, only a single code line had to be changed.

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3395:
-

Commit 1752475 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1752475 ]

PDFBOX-3395: revert last change and allow empty glyf table instead

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3395:
-

Commit 1752474 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1752474 ]

PDFBOX-3395: forgot to restore exception

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3395:
-

Commit 1752472 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1752472 ]

PDFBOX-3395: revert last change and allow empty glyf table instead

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3395:
-

1) that would be more complicated 2) in theory, the glyf table might also be 
missing. But I'll make a test to see what happens.

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread Daniel Persson (JIRA)

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

Daniel Persson commented on PDFBOX-3395:


True, if you read the glyph table you'll get an empty one. The problem is the 
line that generally skips tables of lenght 0 in the parser. Seems a bit odd. If 
the font have defined a table then the empty one should be a valid table right?

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread John Hewson (JIRA)

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

John Hewson commented on PDFBOX-3395:
-

I'm not sure about this fix. Isn't the problem that our parser is treating an 
empty  glyph table as being missing, when in fact it is present, it's just 
empty. This fix seems to be propagating the parsing problem so that other logic 
has to handle a null glyph table, but it seems like the parser should actually 
just be producing an empty (but not null) glyph table?

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3395:
-

Commit 1752460 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1752460 ]

PDFBOX-3395: allow missing glyf table

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-13 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3395:
-

Commit 1752459 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1752459 ]

PDFBOX-3395: allow missing glyf table

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-12 Thread Daniel Persson (JIRA)

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

Daniel Persson commented on PDFBOX-3395:


Then again the specification doesn't say that a glyph table require any glyphs. 
So why should an empty generate a warning. A missing table, yes that is an 
error

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-12 Thread Daniel Persson (JIRA)

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

Daniel Persson commented on PDFBOX-3395:


Correct, that's why I logged this as a minor wish issue. Our logging framework 
alerts us on errors and this isn't one so waking up to a false positive isn't 
preferable.

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-12 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3395:
-

The file does not fail to render, it displays an error and another font is 
used. The alternative would be to log a warning (or less) and return an empty 
path.

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-12 Thread Daniel Persson (JIRA)

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

Daniel Persson commented on PDFBOX-3395:


Thanks for the heads up, not terrible important that it won't be indexed. After 
all it's just an ads page. And I guess you might want to use it for a test case 
later.

> 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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



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

2016-07-09 Thread Tilman Hausherr (JIRA)

[ 
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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org