[
https://issues.apache.org/jira/browse/PDFBOX-3727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ravi updated PDFBOX-3727:
-------------------------
would this be a big change? if so any time we can expect resolution?
From: Tilman Hausherr (JIRA) <[email protected]>
To: [email protected]
Sent: Wednesday, March 22, 2017 2:09 AM
Subject: [jira] [Commented] (PDFBOX-3727) "premature EOF, image will be
incomplete"
[
https://issues.apache.org/jira/browse/PDFBOX-3727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935799#comment-15935799
]
Tilman Hausherr commented on PDFBOX-3727:
-----------------------------------------
As seen in the screenshot,
!screenshot-1.png!
the rows value is different than the height value. In your image, the height
value is the correct one. Our current code takes the smaller of the two, due to
the file in PDFBOX-771 where the rows value is too large (1084975104).
The good news is that it is possible to change PDFBox to display your file
correctly. I just need to check that all existing test files still work.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
> "premature EOF, image will be incomplete"
> -----------------------------------------
>
> Key: PDFBOX-3727
> URL: https://issues.apache.org/jira/browse/PDFBOX-3727
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.4, 2.0.5
> Environment: Windows 10/X64
> Reporter: Ravi
> Labels: CCITTFaxDecode, ccitt
> Attachments: screenshot-1.png
>
>
> I am trying to extract all the embeded images from Pdf file. But some times
> the images extracted are throwing warnings below.
> {code}
> [main] WARN o.a.p.p.g.image.SampledImageReader - premature EOF, image will
> be incomplete
> {code}
> The extracted images are half-complete(half- greyed out)
> I would like to know if any solution available for this. Below is my code
> snippet
> Any Help is greatly appreciated.
> {code}
> public static void testPDFBoxExtractImages() throws Exception {
> PDDocument document = PDDocument.load(new File(fileName));
> PDPageTree list = document.getPages();
> for (PDPage page : list) {
> PDResources pdResources = page.getResources();
> System.out.println(page.getRotation());
> for (COSName c : pdResources.getXObjectNames()) {
> PDXObject o = pdResources.getXObject(c);
> if (o instanceof
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject) {
> File file = new File("C:/temp/" + System.nanoTime() +
> ".png");
>
> ImageIO.write(((org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject)o).getImage(),
> "png", file);
> }
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]