Temp Status?

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

Temp Status?

Post by jeffp »

Is there a way to set a Document as temp or some other property so that when the save button is pressed a Save As Dialog appears rather than just saving the file directly?

--Jeff
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Temp Status?

Post by Tracker Supp-Stefan »

Hello jeffp,

You probably need to capture the e.document.beforeSave:
https://sdkhelp.pdf-xchange.com/vi ... beforeSave
And then set the PXV_DocSave_Copy flag:
https://sdkhelp.pdf-xchange.com/vi ... cSaveFlags
So that the SaveAs... is triggered instead of a silent save.

Kind regards,
Stefan
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Temp Status?

Post by jeffp »

How exactly to I add the PXV_DocSave_Copy to the DocSaveEvent.Flags. See below.

Code: Select all

procedure TMyPDFControl.DoEvent(ASender: TObject; nEventID: Integer; const pEvent: IEvent; const pFrom: IUnknown);
var
  ADoc: IPXV_Document;
begin
  if (nEventID = FEvent_DocBeforeSave) then
  begin
    ADoc := IPXV_Document(pFrom);
    //HOW DO I SET PXV_DocSave_Copy ??
  end;

end;
Wait. I got it.

Code: Select all


     nFlags := IPXV_DocSaveEvent(pEvent).Flags;
      nFlags := nFlags or PXV_DocSave_Copy;
      IPXV_DocSaveEvent(pEvent).Flags := nFlags;

User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1778
Joined: Mon Jan 15, 2018 9:01 am

Temp Status?

Post by Dimitar - Tracker Supp »

:)
Post Reply