[
https://issues.apache.org/jira/browse/PDFBOX-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13877439#comment-13877439
]
Lukas Vasek commented on PDFBOX-1856:
-------------------------------------
I've got yesterday version (1559806) and java 7 too.
I'm printing to foxit reader pdf printer, but I think this doesn't matter.
I'm working with threads like this:
PDDocument doc = PDDocument.load(bis);
List<PDPage> pages = new ArrayList<PDPage>();
doc.getDocumentCatalog().getPages().getAllKids(pages);
PDPage page = null;
Book book = new Book();
BufferedImage img = null;
List<PDF2BuffereImageConverterThread> threadList = new
ArrayList<PDF2BuffereImageConverterThread>();
for (int i = 0; i < pages.size(); i++) {
page = pages.get(i);
threadList.add(new
PDF2BuffereImageConverterThread(page, String.valueOf(i)));
}
and then in thread:
image = RenderUtil.convertToImage(page);
where page is input parameter from master thread.
> Can't convert image from PDPage to BufferedImage
> ------------------------------------------------
>
> Key: PDFBOX-1856
> URL: https://issues.apache.org/jira/browse/PDFBOX-1856
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing, Utilities
> Affects Versions: 2.0.0
> Environment: windows 7 x64
> Reporter: Lukas Vasek
> Attachments: pdfbox.pdf, stacktrace.txt
>
>
> Hello,
> I'm trying to print pdf by extracting image from pdf and then print it.
> But I'm getting error
> stop reading corrupt stream due to a DataFormatException
> and nothing is printed.
> I'm attaching original file and stacktrace
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)