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

Tilman Hausherr edited comment on PDFBOX-2513 at 11/29/14 12:59 PM:
--------------------------------------------------------------------

The (incorrect) image is being decoded as a result of ResourceValidationProcess 
calling PDXObject.createXObject. This constructs a PDImageXObject, which 
decodes the image stream. The decoding is needed because for some types of 
images, some of the image information is taken from the image itself.

The problem is in page 3, it is /Img329 that doesn't decode.

This mentions a possible fix:
http://itext-general.2136553.n4.nabble.com/Fix-for-quot-EOL-code-word-encountered-in-White-run-quot-in-TIFFFaxDecoder-td2145534.html

The updated source code is here:
https://java.net/nonav/projects/jai-core/sources/svn/content/tags/root-1_1_3/src/share/classes/com/sun/media/jai/codecimpl/TIFFFaxDecoder.java?rev=111

I haven't tested it. I don't really see this as a high priority unless it can 
be proven that this is indeed a bug, i.e. that the image is correct.


was (Author: tilman):
The (incorrect) image is being decoded as a result of ResourceValidationProcess 
calling PDXObject.createXObject. This constructs a PDImageXObject, which 
decodes the image stream. The decoding is needed because for some types of 
images, some of the image information is taken from the image itself.

The problem is in page 3, it is Img328 and/or Img329 that doesn't decode.

This mentions a possible fix:
http://itext-general.2136553.n4.nabble.com/Fix-for-quot-EOL-code-word-encountered-in-White-run-quot-in-TIFFFaxDecoder-td2145534.html

The updated source code is here:
https://java.net/nonav/projects/jai-core/sources/svn/content/tags/root-1_1_3/src/share/classes/com/sun/media/jai/codecimpl/TIFFFaxDecoder.java?rev=111

I haven't tested it. I don't really see this as a high priority unless it can 
be proven that this is indeed a bug, i.e. that the image is correct.

> false negative? RuntimeException: EOL encountered in white run
> --------------------------------------------------------------
>
>                 Key: PDFBOX-2513
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2513
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Preflight
>    Affects Versions: 2.0.0
>         Environment: java7 deb7
>            Reporter: Ralf Hauser
>              Labels: CCITTFaxDecode
>         Attachments: 2513.pdf, patch2513.txt, patch2513a.txt
>
>
> java.lang.RuntimeException: EOL encountered in white run.
>       at 
> org.apache.pdfbox.filter.ccitt.TIFFFaxDecoder.decodeWhiteCodeWord(TIFFFaxDecoder.java:1168)
>       at 
> org.apache.pdfbox.filter.ccitt.TIFFFaxDecoder.decodeT6(TIFFFaxDecoder.java:980)
>       at 
> org.apache.pdfbox.filter.CCITTFaxFilter.decode(CCITTFaxFilter.java:95)
>       at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:386)
>       at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:335)
>       at org.apache.pdfbox.cos.COSStream.getDecodeResult(COSStream.java:290)
>       at 
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.<init>(PDImageXObject.java:115)
>       at 
> org.apache.pdfbox.pdmodel.graphics.PDXObject.createXObject(PDXObject.java:65)
>       at 
> org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess.validateXObjects(ResourcesValidationProcess.java:285)
>       at 
> org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess.validate(ResourcesValidationProcess.java:80)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:81)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:54)
>       at 
> org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess.validateResources(SinglePageValidationProcess.java:167)
>       at 
> org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess.validate(SinglePageValidationProcess.java:82)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:81)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:54)
>       at 
> org.apache.pdfbox.preflight.process.PageTreeValidationProcess.validatePage(PageTreeValidationProcess.java:56)
>       at 
> org.apache.pdfbox.preflight.process.PageTreeValidationProcess.validate(PageTreeValidationProcess.java:45)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:81)
>       at 
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:118)
>       at 
> org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:168)



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

Reply via email to