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



Re: Blank page generation issue - Unknown code in Huffman RLE stream

2024-04-04 Thread Tilman Hausherr
2.0.19 is 4 years old, why are you using it? Please retry with 2.0.31. I 
tried and your file works, despite that it is broken.


Tilman

On 04.04.2024 06:13, Himanshu Jain wrote:

Hello Team,

We are using pdf-box to generate images of each page of the pdf.
While generating images we are getting warning 
"org.apache.pdfbox.contentstream.PDFStreamEngine:  Unknown code in 
Huffman RLE stream" for some of the pages and blank image is getting 
generated.
Could you please help us, find attached pdf for reproducing the issue. 
we are using following dependencies of pdf-box.



    org.apache.pdfbox
    pdfbox
    2.0.19



    org.apache.pdfbox
    pdfbox-tools
    2.0.19



    org.apache.pdfbox
    jbig2-imageio
    3.0.3


Thanks,
Himanshu

SLB-Private


-
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