Is it possible to set profile using COM?

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

Hello?


Is possible or not?

Thank you.

Hi,


yes it is possible: Public Property Let cPrinterProfile(ByVal PrinterName As String, ByVal ProfileName As String)

regards,

Robin

Hi,


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…

What am I missing?

Hi,

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?

regards,

Robin

When I run this script on the clean instalation it returns: Profile: ""
Dim creator As Variant
Set creator = CreateObject("PDFCreator.clsPDFCreator")
With creator
Call .cStart("",True)
Print |Profile: "| & .cPrinterProfile("PDFCreator") & |"|
Call .cClose
End With
So it looks like default profile is "".

And if I change it with script:
Dim creator As Variant
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 ...

Hello?


I have done many tests but I have no success…

I can promise some reward for solving this problem. It is very important for me.

Hi,


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.

regards,

Robin