Can not change "UseTempProfiles" and "ShowSelectProfileDialo

Post here any questions/suggestions you have about novaPDF SDK or novaPDF OEM.
Post Reply
sebas
Posts: 2
Joined: Mon Feb 18, 2013 12:50 pm

Can not change "UseTempProfiles" and "ShowSelectProfileDialo

Post by sebas »

Hallo,

I can not change (with c++) the global settings "UseTempProfiles" and "ShowSelectProfileDialog". Other options are working fine. I always use the same profil. Should I delete it first?

Thanks in advance
Sebastian Mayer

I am using SDK 7 with te following code:
...
if (SUCCEEDED(hr)) {
pNova->StartUpdateProfiles();
pNova->AddProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionString(NOVAPDF_SAVE_FOLDER, pdfPath, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionString(NOVAPDF_SAVE_FILE, pdfFile, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionLong(NOVAPDF_USE_TEMP_PROFILES, 1, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionLong(NOVAPDF_SAVE_CONFLICT_STRATEGY, FILE_CONFLICT_STRATEGY_OVERWRITE, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionLong(NOVAPDF_SHOW_SELECT_PROFILE, 0, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionLong(NOVAPDF_SAVE_PROMPT, 0, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->EndUpdateProfiles();
pNova->SetActiveProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
} else {
MessageBox(NULL, L"Failed to initialize novaPDF Printer", L"novaPDF", MB_OK);
}

Lorant (Softland)
Posts: 177
Joined: Wed Dec 16, 2009 10:48 am

Re: Can not change "UseTempProfiles" and "ShowSelectProfileD

Post by Lorant (Softland) »

Hi sebas,
These two options are not included in profile options, they are global options for the printer. So you have to use the "SetPrinterOption" function to set these options.

sebas
Posts: 2
Joined: Mon Feb 18, 2013 12:50 pm

Re: Can not change "UseTempProfiles" and "ShowSelectProfileD

Post by sebas »

Hello,

I've changed to "setPrinterOptions" and the Options are set correctly, but I receive te message, that my current profile can be read. If I comment the "setPrinterOPtion" all works well again.

...
pNova->SetPrinterOption(NOVAPDF_USE_TEMP_PROFILES, 0);
pNova->SetPrinterOption(NOVAPDF_SHOW_SELECT_PROFILE, 0);

pNova->StartUpdateProfiles();
pNova->AddProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionString(NOVAPDF_SAVE_FOLDER, pdfPath, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionString(NOVAPDF_SAVE_FILE, pdfFile, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionLong(NOVAPDF_SAVE_CONFLICT_STRATEGY, FILE_CONFLICT_STRATEGY_OVERWRITE, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->SetOptionLong(NOVAPDF_SAVE_PROMPT, 0, PROFILE_NAME, PROFILE_IS_PUBLIC);
pNova->EndUpdateProfiles();
pNova->SetActiveProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
...

Lorant (Softland)
Posts: 177
Joined: Wed Dec 16, 2009 10:48 am

Re: Can not change "UseTempProfiles" and "ShowSelectProfileD

Post by Lorant (Softland) »

Since we require more information it would be easier if you could email us at [email protected] to solve this faster. Thank you.

Post Reply