[
https://issues.apache.org/jira/browse/PDFBOX-3661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15846860#comment-15846860
]
Andreas Lehmkühler edited comment on PDFBOX-3661 at 2/1/17 6:33 AM:
--------------------------------------------------------------------
I try to create a empty revision. Other file welformed is corect update.
This is my test case:
{code}
try {
ScratchFile SCRATCH_FILE_TEMP = new
ScratchFile(MemoryUsageSetting.setupMixed(10000000));
RandomAccess randomAccess = SCRATCH_FILE_TEMP.createBuffer(new
FileInputStream("C:\\Users\\marco.monacelli.ARUBA\\Desktop\\test\\test_xref_mal_formato\\simple_malformed_doc_signed.pdf"));
PDFParser parser = new PDFParser(randomAccess, SCRATCH_FILE_TEMP);
parser.parse();
PDDocument document = parser.getPDDocument();
document.saveIncremental(new
FileOutputStream("C:\\Users\\marco.monacelli.ARUBA\\Desktop\\test\\test_xref_mal_formato\\simple_malformed_doc_signed_resaved.pdf"));
} catch (Exception ex) {
logger.log(Level.SEVERE, null, ex);
}
{code}
was (Author: [email protected]):
I try to create a empty revision. Other file welformed is corect update.
This is my test case:
try {
ScratchFile SCRATCH_FILE_TEMP = new
ScratchFile(MemoryUsageSetting.setupMixed(10000000));
RandomAccess randomAccess = SCRATCH_FILE_TEMP.createBuffer(new
FileInputStream("C:\\Users\\marco.monacelli.ARUBA\\Desktop\\test\\test_xref_mal_formato\\simple_malformed_doc_signed.pdf"));
PDFParser parser = new PDFParser(randomAccess, SCRATCH_FILE_TEMP);
parser.parse();
PDDocument document = parser.getPDDocument();
document.saveIncremental(new
FileOutputStream("C:\\Users\\marco.monacelli.ARUBA\\Desktop\\test\\test_xref_mal_formato\\simple_malformed_doc_signed_resaved.pdf"));
} catch (Exception ex) {
logger.log(Level.SEVERE, null, ex);
}
> Problem With Malformed xref
> ---------------------------
>
> Key: PDFBOX-3661
> URL: https://issues.apache.org/jira/browse/PDFBOX-3661
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.4
> Environment: Windows 10 JVM 8
> Reporter: Marco Monacelli
> Assignee: Andreas Lehmkühler
> Fix For: 2.0.5, 2.1.0
>
> Attachments: from_trunk.patch, simple_malformed_doc.pdf,
> simple_malformed_doc_signed.pdf
>
>
> Some files generated with unknown software. Generated malformed xref table,
> this instead of being well-formed with the correct EOL is in one line.
> Other readers correctly read the file, and sign it.
> PDFBox instead give Exception for malformed xref.
> I tried created a patch that allows you to read the above mentioned file.
> Because the original file is private I proceeded to recreate one the patch
> works with both.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]