Michael Deck created PDFBOX-2260:
------------------------------------
Summary: Null Pointer Exception when writing an image
Key: PDFBOX-2260
URL: https://issues.apache.org/jira/browse/PDFBOX-2260
Project: PDFBox
Issue Type: Bug
Components: PDModel
Environment: Windows 7 64-bit
Reporter: Michael Deck
Priority: Blocker
java.lang.NullPointerException
at org.apache.pdfbox.pdmodel.pddocument.getdocumentcatalog(pddocument.java:764)
at org.apache.pdfbox.util.pdfimagewriter.writeimage(pdfimagewriter.java:125)
at myfile(26)
My File:
21: File f = new File(file);
22: InputStream in = new FileInputStream(f);
23: BaseParser bp = new PDFParser(in);
24: PDDocument pdf = new PDDocument(new COSDocument(), bp);
25: PDFImageWriter writer = new PDFImageWriter();
26: writer.writeImage(pdf, "png", "", 1, 1, ".pdf", BufferedImage.TYPE_INT_RGB,
300);
I am not sure why I am getting a null pointer exception. The pdf I am getting
the image from has data in it.
--
This message was sent by Atlassian JIRA
(v6.2#6252)