[ 
https://issues.apache.org/jira/browse/PDFBOX-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13879933#comment-13879933
 ] 

Timo Boehme commented on PDFBOX-1822:
-------------------------------------

We could add enum parameter xrefType to XrefTrailerResolver.XrefTrailerObj 
which is set while calling XrefTrailerResolver.nextXrefObj( final long 
startBytePos, xrefType ) (new 2nd parameter). Then we add method in 
XrefTrailerResolver:
public XREF_TYPE getXrefType() { return ( resolvedXrefTrailer == null ) ? null 
: resolvedXrefTrailer.xrefType;   }
This can be called in PDFParser in method parse() after line
            document.addXRefTable( xrefTrailerResolver.getXrefTable() );
to set type in COSDocument.

My previous solution was a work-around which does not change (but restores) the 
processing behavior for PDFParser given that this streaming approach is 
problematic in itself (and the usage should be discouraged) so that the fix for 
this very specific case with wrong dictionary entry is not worth the effort (in 
my opinion), However the above solution might be advantageous if one needs to 
know the kind of xref object later on.


> Signature byte range is Invalid
> -------------------------------
>
>                 Key: PDFBOX-1822
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1822
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing, PDModel, PDModel.AcroForm, Signing
>    Affects Versions: 1.8.3, 1.8.4, 2.0.0
>            Reporter: vakhtang koroghlishvili
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.8.4, 2.0.0
>
>         Attachments: araxis-merge - compare two document.jpg, 
> damaged-sig.jpg, unsigned-signed.pdf, unsigned.pdf, unsigned_signed_fix.pdf
>
>
> On person send me a unsigned PDF document. He wanted to sign it. When I try 
> to sign it (using pad box), I have some problem.
> After signing adobe reader tells me "The signature byre range is invalid".  
> I will attach original and signed document.
> I think, it is PDF box parser error. another signature libraries sign 
> document very well. I'm searching the problem at the moment, in order to fix 
> it.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to