We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

EssentialPDF : Cannot save to the same opened file!

Thread ID:





55563 Jan 31,2007 11:05 PM UTC Feb 2,2007 01:43 PM UTC WinForms 3
Tags: PDF
Asked On January 31, 2007 11:05 PM UTC

I did this in VS2005 C#:

PDFDocument docA = new PDFDocument("C:\\docA.pdf");
PDFDocument docB = new PDFDocument("C:\\docB.pdf");

foreach (IPDFPage page in docB.Pages) {
docA.Pages.Insert(0, page);


I get an I/O error saying that docA.PDF is in use by another process. Question: how can I open an existing PDF, modify it and then save it?



Dhivya K [Syncfusion]
Replied On February 1, 2007 01:40 PM UTC

Hi Richard,

Thank you for the code snippet. I was able to reproduce the issue. The problem is, you are saving the file with the same name that of the source file name which is being used. Can you please change the file name in save statement? This is same as modifying the existing document.

Here is a sample for your reference:

Please take a look into it and let me know if you have any other queries.


Replied On February 1, 2007 02:46 PM UTC

Thanks for your reply. The logic I expected is that you could:

a) Open an existing PDF document
b) Make some modifications to it (add pages, bookmarks, Title, etc)
c) Save it

This is the common behaviour of most applications. In MS-Word for example, you are not required to "Save As..." under a new file name every time you make a change! You just "Save".

Maybe you should add an overload Save() with no parameters that saves the document to the same file it was opened?


Dhivya K [Syncfusion]
Replied On February 2, 2007 01:43 PM UTC

Hi Richard,

Thank you for the information. Currently it is not possible to save a document with the same name. Instead we create a new PDF document with the existing content. I have forwarded this feature request to our development team regarding their thoughts on this overload.

Please let me know if you have any other queries.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon