You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Mohmed (JIRA)" <ji...@apache.org> on 2014/07/17 23:18:06 UTC
[jira] [Updated] (PDFBOX-2218) PDFCheckbox NPE
[ https://issues.apache.org/jira/browse/PDFBOX-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mohmed updated PDFBOX-2218:
---------------------------
Attachment: pdf_parsing_stack_trace
SCJP Sun Certified Programmer for Java 6-0071591060.pdf
> PDFCheckbox NPE
> ---------------
>
> Key: PDFBOX-2218
> URL: https://issues.apache.org/jira/browse/PDFBOX-2218
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 1.8.4
> Environment: Ubuntu
> Reporter: Mohmed
> Fix For: 1.8.7
>
> Attachments: SCJP Sun Certified Programmer for Java 6-0071591060.pdf, pdf_parsing_stack_trace
>
>
> PDF parsing fails for attached PDF.
> Stack trace of failure attached to issue
> Sample code use to parse
> TikaInputStream tikaStream = TikaInputStream.get(stream);
> TikaResultWrapper result;
> try {
> long streamSize = tikaStream.getLength();
> Metadata metadata =
> constructMetadata(fileName, mimeType, streamSize);
> if (streamSize < maxFileSize) {
> SamplingSaxHandler handler =
> new SamplingSaxHandler(samplingSize, metadata);
> handler.setBufferLimit(bufferSize);
> parser.parse(tikaStream, handler, metadata, new ParseContext());
> result = handler.getResult();
> } else {
> result = new TikaResultWrapper(null, metadata);
> }
> } finally {
> tikaStream.close();
> }
> return result;
--
This message was sent by Atlassian JIRA
(v6.2#6252)