Can't Save Changes

Example requests & Code samples for GdPicture Toolkits.
Post Reply
ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Can't Save Changes

Post by ejbrandino » Tue Nov 22, 2016 12:39 am

Hi,
Can anyone help me please. Everytime I made changes on my PDF file like re-ordering pages and adding rubber stamp annotations and then SAVE it, there's no changes on the file after re-opening it..My changes are not saved. What did I missed? I have to saving options, SAVE AS, and SAVE. SAVE AS is working fine, but I have a problem with my SAVE button. Heres my code below.

PDFViewer_Src.SaveAnnotationsToPage();
PDFViewer_Src.SaveDocumentToPDF(Globals.src_filePath);
MessageBox.Show(this, "Changes saved successfully.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

Thank you.

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: Can't Save Changes

Post by Cedric » Wed Nov 23, 2016 1:26 pm

It's impossible to say, you need to check the returned status of each method call in order to find out what the error is.

ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Re: Can't Save Changes

Post by ejbrandino » Thu Nov 24, 2016 4:27 am

I see the problem, it doesn't save because the file is being used, it is currently loaded on the PDF viewer, is it possible to save changes to the file while it is being used/viewed? how?

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: Can't Save Changes

Post by Cedric » Thu Nov 24, 2016 10:49 am

You obviously need to release the file before being able to delete or replace it. The best practice for this kind of case would be to save the document to a memory stream, release the source document and save the memory stream content to replace the source file.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests