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 Jun 20, 2018 7:00 pm

I am able to successfully merge pdf files in most cases, however I am having trouble doing so with a particular set of files that are based upon the same pdf template. This is occurring using the latest version of Spire.PDF v4.6.4. Attached you'll find a zip file containing the three source pdf files, a small console app which makes use of the PdfDocument.MergeFiles method, and it also contains a "result.pdf" file which is the result that I am seeing. I excluded the referenced Spire.PDF dlls because they made the zip too large to upload here.

If you open result.pdf you'll see that the content is cut off when compared with the individual source pdf files. Note that if I change the code to open the first source pdf and then use AppendPage(PdfDocument document) method to append the other two the first page of the result will be correct, but each subsequent page will be cut off as seen here. Note that these files represent a Form 1099-MISC from the IRS, however the content is purely test data and does not represent a real person or earnings.

I've tried using a handful of online pdf file merging sites and each of them was able to successfully merge the source pdf files without any issues, so I believe that something about my pdf template is causing Spire to fail to merge them correctly. Can you please tell me what I am doing wrong? I've only been using Spire for a few weeks, so it's largely new to me.

coskibum00
 
Posts: 3
Joined: Wed Jun 20, 2018 6:49 pm

Wed Jun 20, 2018 7:05 pm

I should have included the code contained within the executable in the attached zip file for your reference. See additional attachment including source code for console app.

coskibum00
 
Posts: 3
Joined: Wed Jun 20, 2018 6:49 pm

Thu Jun 21, 2018 2:31 am

Dear coskibum00,

Many thanks for your detailed information.
I have reproduced your issue and logged it in our bug tracking system. We will let you know once there is any update.
Sorry for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jul 13, 2018 8:09 am

Dear coskibum00,

Thanks for waiting.
Now the issue is fixed in Spire.PDF Pack(Hot Fix) Version:4.7.4. Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jul 17, 2018 2:44 pm

Thank you for your response and update to Spire.PDF. The issue has been resolved in the small, stand alone app that I created to demonstrate the issue. I have not been able to fully incorporate the fix in our full application to verify, but I suspect that it will be resolved. I will post again if I find that I am still having issues.

coskibum00
 
Posts: 3
Joined: Wed Jun 20, 2018 6:49 pm

Wed Jul 18, 2018 1:21 am

Dear coskibum00,

Thanks for your feedback.
If you encounter any question, please do not hesitate to contact us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF