Change target directory with c#


#1

Is it possible change target directory for save pdf with c#?

I have found some settings in HKCU but its doesnt work.
HKEY_CURRENT_USER\SOFTWARE\pdfforge\PDFCreator\Settings\ConversionProfiles\0\

Change targetdirectory does'nt efffect...don't saved
thx.


#2

find solution.. need save path with "\"


#3

Hi,

while you can change the setting directly in the registry, this isn't recommended and might have some timing issues. The best way to change the target directory from C# is using the COM-interface:
http://docs.pdfforge.org/pdfcreator/3.2/en/pdfcreator/com-interface/

It is also possible to set it through a command line:
http://docs.pdfforge.org/pdfcreator/3.2/en/pdfcreator/using-pdfcreator/command-line-parameters/

Best regards

Robin


PDFCreator 3.1.1 ShowQuickActions Registry Settings
#4

I tested this solution.for c#
In Visual Studio added this reference PDFCreator.COM.dll from PDFCreator directory . Can't add COM-interface directly

In code I have:

private void button1_Click(object sender, EventArgs e)
        {
            var printers = new pdfforge.PDFCreator.UI.COM.Queue();
            printers.Initialize();
            printers.WaitForJob(10);

            var ojob = printers.NextJob;
            ojob.SetProfileByGuid("DefaultGuid");

           ojob.SetProfileSetting("OpenViewer", "False");
            ojob.

        }

But still make error ...can't find file and other...What I am doing wrong?

thx.


#5

Hi,

nothing is actually getting printed in that code, so unless you printed it manually, it can't do anything.
There are some examples inside the COM Scripts\C# folder located in the PDFCreator application folder.

Best regards

Robin