Can not change "UseTempProfiles" and "ShowSelectProfileDialo

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

Can not change "UseTempProfiles" and "ShowSelectProfileDialo

Postby sebas » Mon Feb 18, 2013 1:23 pm

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);
}

Softland
Posts: 156
Joined: Wed Dec 16, 2009 10:48 am
Location: Cluj-Napoca, Romania
Contact:

Re: Can not change "UseTempProfiles" and "ShowSelectProfileD

Postby Softland » Tue Feb 19, 2013 9:19 am

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

Postby sebas » Tue Feb 19, 2013 10:35 am

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);
...

Softland
Posts: 156
Joined: Wed Dec 16, 2009 10:48 am
Location: Cluj-Napoca, Romania
Contact:

Re: Can not change "UseTempProfiles" and "ShowSelectProfileD

Postby Softland » Mon Mar 04, 2013 8:42 am

Since we require more information it would be easier if you could email us at support@novapdf.com to solve this faster. Thank you.


Return to “Developer Tools”