In the PDFCreator there are some saved Options profile used for PDF printing using UI. I want to use the same profiles using COM interface for automatic printing. So idea is someting like this:
1) read name of the current profile (default for this user?),
2) set another saved profile (with some settings, ie. signing) - I have name of the saved profile,
3) print doc using profile,
4) set everything back.
I cannot find any example with cOptionProfile property...
thank you for hint, but unfortunately it works only to set new by user created profile, but I cannot switch it back to default profile. As I find out - name of the default profile is “” (empty string), am I right?
And I have second big problem, even if I set profile to new one, autosave settings stop working…
I am not 100% sure about the name for the default profile, maybe best save it under a different name so you can access it easily. Do you mean, the autosave settings don’t get taken from the new profile? Are the default settings used instead? What happens, if you try to autosave on a new profile?
Set creator = CreateObject("PDFCreator.clsPDFCreator")
With creator
Call .cStart("",True)
.cPrinterProfile("PDFCreator") = "Signed"
Call .cClearCache
Call .cClose
End With
It stays on this profile "Signed". And I cannot change profile back to default (or "").
.cPrinterProfile("PDFCreator") = "" doesn't work and stay "Signed".
This is problem No.1.
And second problem is that: with default profile works autosave options perfectly. But after I changed profile it looks like autosave options are ignored and after call print, it shows save dialog ...
I asked one of our developers and the default profile isn’t directly accesible with a name (the other profiles are stored with their name in the registry, default profile actually means no profile but use the general settings) so it would be neccesary to first save the current settings temporarly to restore them later. Maybe the best solution for you is to work without profiles and access the settings directly.