pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CAP (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (PDFBOX-4317) Some feature of the given JPEG leads to erroneous results, when adding (drawing) it to a PDPageContentStream.
Date Fri, 14 Sep 2018 07:47:00 GMT

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

CAP edited comment on PDFBOX-4317 at 9/14/18 7:46 AM:
------------------------------------------------------

Hello Mr. Hausherr,
 that is exactly what is confusing me. The PDF does contain all necessary information in a
valid form, to display the image and ie the PDF Debugger never complained about the containing
page and displays the image just fine.
 Also I am not able to find anything, that is "special" about this jpeg and I have already
disected it to the best of my ability. We have already added similar jpegs to PDF files (using
PDFbox) and never encountered a behaviour like this.

*The problem*
 When opening the PDF in Adobe applications like Adobe Reader or Adobe Acrobat Pro DC, the
application will still claim, that the image's stream is erroneous (appended screenshots).
 As the PDF has been created using the given code, this can only be referring to the image
stream (as the stream is the only thing contained in the PDF).

*Where did you get it?*
 The image has been send to us by a customer and "Has been shot using an Android-Handy. Has
been send to another user via WhatsApp and has finally been appended to a mail (*.eml) file."

*EDIT*
I appended a PDF file, that has been created by Adobe Acrobat Pro DC and does seem to contain
the image in a "valid" stream.

*Adobe Acrobat Pro DC*
 !image-2018-09-14-09-14-45-358.png!

 

*Adobe Reader (an internal Error occurred)*
 *!image-2018-09-14-09-15-40-860.png!*


was (Author: cap-softvision):
Hello Mr. Hausherr,
that is exactly what is confusing me. The PDF does contain all necessary information in a
valid form, to display the image and ie the PDF Debugger never complained about the containing
page and displays the image just fine.
Also I am not able to find anything, that is "special" about this jpeg and I have already
disected it to the best of my ability. We have already added similar jpegs to PDF files (using
PDFbox) and never encountered a behaviour like this.

*The problem*
 When opening the PDF in Adobe applications like Adobe Reader or Adobe Acrobat Pro DC, the
application will still claim, that the image's stream is erroneous (appended screenshots).
As the PDF has been created using the given code, this can only be referring to the image
stream (as the stream is the only thing contained in the PDF).

*Where did you get it?*
The image has been send to us by a customer and "Has been shot using an Android-Handy. Has
been send to another user via WhatsApp and has finally been appended to a mail (*.eml) file."

*Adobe Acrobat Pro DC*
!image-2018-09-14-09-14-45-358.png!

 

*Adobe Reader (an internal Error occurred)*
*!image-2018-09-14-09-15-40-860.png!*

> Some feature of the given JPEG leads to erroneous results, when adding (drawing) it to
a PDPageContentStream.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4317
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4317
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 2.0.9
>            Reporter: CAP
>            Priority: Major
>         Attachments: IMG-20180719-WA0000.jpg, UsingAdobeDC.pdf, image-2018-09-14-09-13-56-216.png,
image-2018-09-14-09-14-45-358.png, image-2018-09-14-09-15-40-860.png, out.pdf
>
>
> Some feature of the given JPEG leads to erroneous results, when adding (drawing) it to
a PDPageContentStream.
> The document itself is created just fine and the page is displayable in the "PDF Debugger"
application, but for example the Adobe Reader is reporting an "internal Error", when opening
the created PDF.
> Reproducable via:
> {code:java}
> try(PDDocument document = new PDDocument()){
>  PDPage page = new PDPage();
>  try(PDPageContentStream pcs = new PDPageContentStream(document, page)){
>     PDImageXObject pdImage = PDImageXObject.createFromFile("path to jpeg", document);
>     pcs.drawImage(pdImage, 30, 30);
>  }
>  document.addPage(page);
>  document.save(new File("output file"));
> }{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message