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.

Tue Dec 17, 2019 6:54 pm

Getting the following error when merging/saving files

A call to Spire.pdf.pdfdocument.savetofile failed with this message: The requested operation cannot be performed on a file with a user-mapped section open.

Code Calls
spirePDF := spirePDF.PdfDocument;
IF FileNo <> 1 THEN
spirePDF.LoadFromFile(OutputFile);
spirePDF2 := spirePDF2.PdfDocument;
spirePDF2.LoadFromFile(InputFile);
spirePDF.AppendPage(spirePDF2);
spirePDF.SaveToFile(OutputFile);
spirePDF.Close;
spirePDF2.Close;

sdoherty
 
Posts: 5
Joined: Thu Sep 21, 2017 2:14 pm

Wed Dec 18, 2019 6:26 am

Hi,

Thanks for your inquiry.
I firstly suggest you try to merge PDF files with new method, if the issue still exists after trying, to help us investigate your issue accurately, please offer us the following information.
1. Your input Pdf files.
2. The OS and Region information, e.g. Win7, 64bit, China/Chinese.

You could upload them here or send us([email protected]) via email.

Best wishes,
Amber
E-iceblue support team
User avatar

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

Return to Spire.PDF