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

Juraj Lonc edited comment on PDFBOX-2074 at 5/12/14 7:57 PM:
-------------------------------------------------------------

I have no idea how to properly handle entries that are longer than 2 bytes.
But I think it is better to skip them and not throw Exception there. Just 
logging of warning or error should be fine.

If somebody tries to render (to image) such PDF now it will fail.
I suggest to remove that Exception so PDF will be rendered. Rendered image will 
be most likely ok. Maybe some char will not be drawn.


was (Author: chupacabras):
I have no idea how to properly handle entries that are longer than 2 bytes.
But I think it is better skip them and not throw Exception there. Just logging 
warning or error should be fine.

If somebody tries to render (to image) such PDF now it will fail.
I suggest to remove that Exception so PDF will be rendered. Rendered image will 
be most likely ok. Maybe some char will not be drawn.

> 4-bytes CMap entry causes exception
> -----------------------------------
>
>                 Key: PDFBOX-2074
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2074
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Juraj Lonc
>         Attachments: PDFBOX-2074_CMap.diff, pdf_with_4B_cmap_entry.pdf
>
>
> I have PDF that has CMap entry consisting of 4 bytes. It is just one entry 
> with that size, other entries have 2-bytes.
> Adobe reader has no problems with that, PDFBox throws Exception.
> I think this Exception should not be thrown. It should be skipped or 
> truncated tu 2 bytes and write warning to log.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to