Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Nov 06, 2019 9:51 pm

Hello, again.

We are seeing an issue when the PdfDocument.MergeFiles(Stream[]) method is used to merge two PDFs together. When the saved PDF is opened in Adobe Acrobat Reader, it looks fine, but Reader will prompt to save the document when it is closed. I have rewritten our merge code to create a new PdfDocument and add the other PDFs using AppendPage(PdfDocument) instead and the resulting PDF is fine.

Attached is a zip file with a source PDF file (linq.pdf) and the result of merging that document with itself using MergeFiles().

pni.jkeyser
 
Posts: 7
Joined: Mon Oct 21, 2019 8:30 pm

Thu Nov 07, 2019 3:22 am

Hi,

Thanks for your inquiry.
I tried to merge your file by memoryStream and did notice the issue you mentioned. I have logged it into our bug tracking system, once there is any progress, we will inform you. Sorry for the inconvenience caused.

And I found if you don't merge the Pdf files by memoryStream, there won't be the issue in result file. You could have a try, below is the code for you.
Code: Select all
            String[] files = new String[] { filepath1, filepath1 };
            PdfDocumentBase doc = PdfDocument.MergeFiles(files);
            doc.Save("result.pdf", FileFormat.PDF);


Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Fri Nov 08, 2019 1:02 pm

Thanks for the workaround. I'll consider using that.

pni.jkeyser
 
Posts: 7
Joined: Mon Oct 21, 2019 8:30 pm

Mon Nov 11, 2019 9:59 am

Hi,

Thanks for your reply. Sorry to reply late for weekend.
Once there is any progress regarding the issue with your original code, we will inform you ASAP.
Sorry for the inconvenience caused.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Wed Dec 04, 2019 2:51 pm

Hi, I have the same problem. I have to use Streams, so the workaround is not an option.
Any progress on fixing this BUG? I'm using version 5.11.18.

[email protected]
 
Posts: 5
Joined: Mon May 13, 2019 11:38 am

Thu Dec 05, 2019 1:18 am

Hi,

Thanks for your inquiry.
I checked the status of this issue in our bug tracking system. It is in the testing phase now. Once there is any progress, we will inform you ASAP.
Sorry for the inconvenience caused.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Fri Mar 19, 2021 9:18 am

Hi all,

Greetings from E-iceblue!
Glad to inform you that we just released Spire.PDF Pack(Hot Fix) Version:7.3.3 which fixes your issue, please download it from the following links to test on your side. Looking forward to your testing result.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/7.3.3

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF

cron