Suppressing the File Save As Dialog

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

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

Post Reply
71SoCal
User
Posts: 21
Joined: Fri Jul 31, 2009 9:50 pm

Suppressing the File Save As Dialog

Post by 71SoCal »

I'm generating a pdf from my application and don't want to see the Save As dialog come up. Below are the properties that I'm using to set up the printer. I'm setting the Save.ShowSaveDialog to "No" and providing my own filename, but I'm still seeing the dialog. Can anyone comment if my parameters are set up correctly?

Thanks, Mike

bool PrimoPDFImageDriver::InitializeDriver()
{
m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
if (m_pFactory == NULL)
return false;

if (m_pPrinter == NULL)
{
m_pPrinter = m_pFactory->Printer[L"", L"PDF-XChange 4.0 Sample", L"<YOUR REG KEY HERE>", L"<YOUR DEV CODE HERE>"];
if (m_pPrinter == NULL)
return false;
}

m_pPrinter->ResetDefaults();
m_pPrinter->Option["Save.SaveType"] = "Save";
m_pPrinter->Option["Save.ShowSaveDialog"] = "No";
m_pPrinter->Option["Save.File"] = (const char*)GetImageFileFullPath();
m_pPrinter->Option["Save.WhenExists"] = "Overwrite";
m_pPrinter->Option["Save.RunApp"] = 0;
m_pPrinter->Option["Overlay.Enabled"] = 0;
m_pPrinter->Option["Compression.Graphics"] = 0;
m_pPrinter->Option["Compression.Text"] = 0;
m_pPrinter->Option["Fonts.EmbedAll"] = 1;
m_pPrinter->ApplyOptions(0);

SetDriverName("PDF-XChange 4.0");
return true;
}
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Suppressing the File Save As Dialog

Post by Ivan - Tracker Software »

Can you explain what this call means:

Code: Select all

SetDriverName("PDF-XChange 4.0");
If the intentions is to set up the default or destination printer, perhaps this code would be more appropriate:

Code: Select all

SetDriverName(m_pPrinter->Name);
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
71SoCal
User
Posts: 21
Joined: Fri Jul 31, 2009 9:50 pm

Re: Suppressing the File Save As Dialog

Post by 71SoCal »

I'm just evaluating this product, so I haven't coded it tightly. I just want to know what are some of the things I can change. Like I said before, I'd like to suppress the file save as dialog. I'd like to change the scaling also. Can you provide some information on this?

Thanks,
Mike
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Suppressing the File Save As Dialog

Post by John - Tracker Supp »

Both can be modified as required - please take a look at the examples and the help file provided and if you have any specific questions or code snippets you need assistance with - feel free to post as appropriate.

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply