Mark Saved Document as Temp

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Mark Saved Document as Temp

Post by jeffp »

How can I mark a document as "Temp" so that your control will throw up the SaveAs dialog if I try to close it.

I have a situation where I create and insert pages into your control from a scan. I then save the document to a temp location. But after saving I need you set a flag to tell your control the document has not been saved. That is, treat it as a temp document so that I can't close it out without it firing a message asking me to save it.

Thanks.

--Jeff
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mark Saved Document as Temp

Post by Sasha - Tracker Dev Team »

Hello jeffp,

The IPXV_Document::SetModified method will put a modified state to the document, thus forcing the Save question popup when closing it.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Mark Saved Document as Temp

Post by jeffp »

SetModified helps in case a user tries to close the file because if prompts to save first.

However, if the user clicks the Save button it will just save it back out to file. Is there another property that can be used to treat the file as if it hasn't been saved before. I need even a Save command by the user to prompt to Save the document and give it a name. I thought way back with the old VIewer SDK there was a Temp property or something that did this.

--Jeff
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mark Saved Document as Temp

Post by Sasha - Tracker Dev Team »

Hello jeffp,

You can catch the id_e_document_beforeSave event and add the PXV_DocSave_Copy flag to the event flags - then the save dialog will become active so that the user can select new destination.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply