How would I specify what Filter Index and Filename to use for the Save As Dialog Box?
Basically I'm trying to add menu selections in to Save As Optimized, Save as PDF/A and such to specific locations (but prompt the user if they want to change it) so maybe I'm missing an easy way to do those functions with the SDK? From what I can tell we would have to use the cmd.saveAs command and set the default name and filter index in the dialog box.
I've tried intercepting the e_document_beforeSave event which allows me to change the filename but I can't get it to display the dialog box and it just saves the file without the dialog.
How to set Filter Index and Default Name for File SaveAs Dialog
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: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to set Filter Index and Default Name for File SaveAs Dialog
Hello RMan,
Can you please give a screenshot of what you mean exactly?
Cheers,
Alex
Can you please give a screenshot of what you mean exactly?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: How to set Filter Index and Default Name for File SaveAs Dialog
HEre you go. Basically we would like to issued the cmd.saveAs and then populate these two fields in the dialog box when it opens.
Re: How to set Filter Index and Default Name for File SaveAs Dialog
Any idea yet on how I can accomplish picking which File Type To Save as in the dialog?
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: How to set Filter Index and Default Name for File SaveAs Dialog
Hi RMan.
You may try to do it via intercepting the e.document.beforeSave:
HTH.
You may try to do it via intercepting the e.document.beforeSave:
Code: Select all
OnEvent(eventID, event ..)
{
if (eventID == pxvInst.Std2ID("e.document.beforeSave"))
{
// to select the "Optimized PDF" type
event.DestConv = FindExportConvByID(pxvInst, "conv.optimized.pdf"); // uses pxvInst.GetFormatConverterIndex/ExportConverter[index]
event.DestConvParams = pxvInst.GetFormatConverterParams(false, "conv.optimized.pdf");
event.Doc.CoreDoc.SrcInfo.CustFileName = L"myTest.pdf"; // to show custom filename
}
else if (eventID == pxvInst.Std2ID("e.document.afterSave"))
{
event.Doc.CoreDoc.SrcInfo.CustFileName = L""; // to stop filename overriding
}
}
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.