RE: Re: Lost xref table on two PDF merge

2024-05-14 Thread František Šimon
Hi,

 

Sorry for late reply. I didn't get your answer to my email and also I can't
reply to it using button on mail archive web page.

I had to manually copy it.

 

My PDFBox version is 3.0.2 and you are right, that the refs are ok after
saving the document.

 

With best regards,

Frantisek Simon

 

On 2024/04/04 15:18:48 Andreas Lehmkühler wrote:

> Hi,

> 

> which version of PDFBox are you using?

> 

> Did you save the merged pdf before you try to fix the signature? The 

> resulting pdf should have a valid xref table.

> 

> Andreas

> 

> Am 04.04.24 um 15:09 schrieb František Šimon:

> > Hello,

> > 

> >   

> > 

> > I encounter a problem when trying to fix some problem with invalid

> > certificate in PDF that I am processing.

> > 

> > I have two PDFs which I am merging together. First one is some one page

> > template where I fill soma data and second one is multiple page PDF
which

> > contains some corrupted signature.

> > 

> >   

> > 

> > When I merge these PDF first and then try to search for corrupted
signature

> > I will get nothing from
document.getDocument().getObjectsByType(COSName.SIG)

> > since xref table of second PDF is replaced with the one from first one.

> > 

> >   

> > 

> > I can get around it in my code but is there a possibility to keep xref
table

> > from both PDFs after merge?

> > 

> >   

> > 

> > With best regards,

> > 

> > Frantisek Simon

> > 

> > 

> 

> -

> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org

> For additional commands, e-mail: users-h...@pdfbox.apache.org

> 

> 



Re: Lost xref table on two PDF merge

2024-04-04 Thread Andreas Lehmkühler

Hi,

which version of PDFBox are you using?

Did you save the merged pdf before you try to fix the signature? The 
resulting pdf should have a valid xref table.


Andreas

Am 04.04.24 um 15:09 schrieb František Šimon:

Hello,

  


I encounter a problem when trying to fix some problem with invalid
certificate in PDF that I am processing.

I have two PDFs which I am merging together. First one is some one page
template where I fill soma data and second one is multiple page PDF which
contains some corrupted signature.

  


When I merge these PDF first and then try to search for corrupted signature
I will get nothing from document.getDocument().getObjectsByType(COSName.SIG)
since xref table of second PDF is replaced with the one from first one.

  


I can get around it in my code but is there a possibility to keep xref table
from both PDFs after merge?

  


With best regards,

Frantisek Simon




-
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



Lost xref table on two PDF merge

2024-04-04 Thread František Šimon
Hello,

 

I encounter a problem when trying to fix some problem with invalid
certificate in PDF that I am processing.

I have two PDFs which I am merging together. First one is some one page
template where I fill soma data and second one is multiple page PDF which
contains some corrupted signature.

 

When I merge these PDF first and then try to search for corrupted signature
I will get nothing from document.getDocument().getObjectsByType(COSName.SIG)
since xref table of second PDF is replaced with the one from first one.

 

I can get around it in my code but is there a possibility to keep xref table
from both PDFs after merge?

 

With best regards,

Frantisek Simon