Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open documents SOLVED
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.
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.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open documents
Hi Support,
I'm executing the cmd.saveAs / cmd.saveCopyAs via Inst.ExecUICmd.
I'm trying to specify the default save to folder via:
Inst.Settings['Docs.Save.SaveAsFolderType'].v := 2
Inst.Settings['Docs.Save.CustomSaveAsFolder'].v := *folder*
Inst.FireAppPrefsChanged(PXV_AppPrefsChange_Documents)
Inst.ExecUICmd('cmd.saveCopyAs')
When the Save As dialog appears - the initial directory is always set to "last used folder".
I've also tried Inst.Settings['Docs.Save.SaveAsFolderType'].v := 1 //original document folder -> but again the last used folder is used.
In EU Editor (9.352) this seems to work correctly.
-žarko
I'm executing the cmd.saveAs / cmd.saveCopyAs via Inst.ExecUICmd.
I'm trying to specify the default save to folder via:
Inst.Settings['Docs.Save.SaveAsFolderType'].v := 2
Inst.Settings['Docs.Save.CustomSaveAsFolder'].v := *folder*
Inst.FireAppPrefsChanged(PXV_AppPrefsChange_Documents)
Inst.ExecUICmd('cmd.saveCopyAs')
When the Save As dialog appears - the initial directory is always set to "last used folder".
I've also tried Inst.Settings['Docs.Save.SaveAsFolderType'].v := 1 //original document folder -> but again the last used folder is used.
In EU Editor (9.352) this seems to work correctly.
-žarko
Last edited by zarkogajic on Fri Mar 05, 2021 9:03 am, edited 1 time in total.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored
Hi Support,
More info: this only happens when a document is open via IStream!
Can be re-created in FullDemo.
Have "ckIStreamSrcDemo" checked and open two documents from two different locations (use multi document mode).
Then, try for each document:
The initial folder for SaveAs dialog is always "last used" - and not what was set above.
-žarko
More info: this only happens when a document is open via IStream!
Can be re-created in FullDemo.
Have "ckIStreamSrcDemo" checked and open two documents from two different locations (use multi document mode).
Then, try for each document:
Code: Select all
pdfCtl.Inst.Settings["Docs.Save.SaveAsFolderType"].v = 1;
//OR
pdfCtl.Inst.Settings["Docs.Save.SaveAsFolderType"].v = 2;
pdfCtl.Inst.Settings["Docs.Save.CustomSaveAsFolder"].v = @"C:\Users\Public\Documents" ;
pdfCtl.Inst.FireAppPrefsChanged(PDFXEdit.PXV_AppPrefsChanges.PXV_AppPrefsChange_Documents);
pdfCtl.Inst.ExecUICmd("cmd.saveCopyAs");
-žarko
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
HI Support,
Also ignored for non-pdf documents opened in PXV_Control (converted to PDF).
-žarko
Also ignored for non-pdf documents opened in PXV_Control (converted to PDF).
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hello zarkogajic,
Well the IStream source does behave differently - forwarded this for detailed investigation.
Cheers,
Alex
Well the IStream source does behave differently - forwarded this for detailed investigation.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hi Alex,
Thanks. Until this is fixed, I'm now custom handling the cmd.saveCopyAs via IUIX_CmdHandler.
Using Inst.ShowSaveFileDlg(pInitialFolderName, ...) + IPXV_Document.Save (.., DefautProgressMon, ..) .. and I can save, at least as ordinary PDF...
There are various PXV_DocSaveFlags I can use for nFlags in Save().
Can you provide more info on PXV_DocSave_Copy, PXV_DocSave_SwitchToDest and PXV_DocSave_Sync ?
The rest of values - I (kind of) figured out ...
-žarko
Thanks. Until this is fixed, I'm now custom handling the cmd.saveCopyAs via IUIX_CmdHandler.
Using Inst.ShowSaveFileDlg(pInitialFolderName, ...) + IPXV_Document.Save (.., DefautProgressMon, ..) .. and I can save, at least as ordinary PDF...
There are various PXV_DocSaveFlags I can use for nFlags in Save().
Can you provide more info on PXV_DocSave_Copy, PXV_DocSave_SwitchToDest and PXV_DocSave_Sync ?
The rest of values - I (kind of) figured out ...
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hello zarkogajic,
Well I passed these IStream problems to Vasyl - waiting for the reply.
Cheers,
Alex
Well I passed these IStream problems to Vasyl - waiting for the reply.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hi Alex,
OK, thanks.
While wating please answer:
OK, thanks.
While wating please answer:
-žCan you provide more info on PXV_DocSave_Copy, PXV_DocSave_SwitchToDest and PXV_DocSave_Sync ?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hello zarkogajic,
Here's what I can get from code comments:
And the last flag chooses how the operation should be executed:
Cheers,
Alex
Here's what I can get from code comments:
Code: Select all
PXV_DocSave_Copy = 0x0002, // to enable "Save As"/"Save as Copy" modes,
// used when pDest == NULL and PXV_DocSave_AllowUI is specified to ask user by "Save As"/"Save as Copy" dialogue
PXV_DocSave_SwitchToDest = 0x0004, // to specify "Save As" nMode exactly
Code: Select all
if ((nFlags & PXV_DocSave_Sync) == 0)
hRes = m_pInst->AsyncDoAndWaitForFinish(pSaveOp, nOpExecFlags);
else
hRes = pSaveOp->Do(nOpExecFlags);
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hi Alex,
Thanks.
Your code hints there's some kind of document save related IOperation ("pSaveOp") ?
I'm using plain IPXV_Document.Save method - does it internally call some "op.saveDoc" ?
-žarko
Thanks.
Your code hints there's some kind of document save related IOperation ("pSaveOp") ?
I'm using plain IPXV_Document.Save method - does it internally call some "op.saveDoc" ?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open docum
Hello zarkogajic,
Yes, we do have an internal save operation that is being called from the save method.
There are plenty of events to tweak what is happening from the SDK, but no direct access to that operation.
Cheers,
Alex
Yes, we do have an internal save operation that is being called from the save method.
There are plenty of events to tweak what is happening from the SDK, but no direct access to that operation.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Default SaveTo Folder for cmd.saveAs / cmd.saveCopyAs -> 'Docs.Save.SaveAsFolderType' ignored for IStream open documents
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ