Hello,
I am initializing the PDF Converter
private void Initialize()
{
// if already called then exit
if (initialized)
return;
// Set FileNameOptions and output file name.
cdiNet.FileNameOptions = Declarations.NoPrompt + Declarations.UseFileName;
cdiNet.DefaultFileName = "C:\\Work\\PDFtest.pdf";
// If not called than initialize it
cdiNet.DriverInit(Declarations.PrinterName);
//Enable the printer before each printout for the Developer version
cdiNet.EnablePrinter(Declarations.LicensedTo, Declarations.ActivationCode);
// Set the Printer as Default, this is needed only if you can not print to a specific printer
cdiNet.SetDefaultPrinter();
// Set initialized to true
initialized = true;
}
but the file created is c:\temp\OutputNet.pdf. I am wondering if the line of code
cdiNet.DefaultFileName = "C:\\Work\\PDFtest.pdf";
does it's job.
Thanks
Tatiana
set DefaultFileName
Re: set DefaultFileName
Well...
I found the answer -
I should have called DriverInit first; this code works fine:
Hello,
I am initializing the PDF Converter
private void Initialize()
{
// if already called then exit
if (initialized)
return;
// If not called than initialize it
cdiNet.DriverInit(Declarations.PrinterName);
//Enable the printer before each printout for the Developer version
cdiNet.EnablePrinter(Declarations.LicensedTo, Declarations.ActivationCode);
// Set FileNameOptions and output file name.
cdiNet.FileNameOptions = Declarations.NoPrompt + Declarations.UseFileName;
cdiNet.DefaultFileName = "C:\\Work\\PDFtest.pdf";
// Set the Printer as Default, this is needed only if you can not print to a specific printer
cdiNet.SetDefaultPrinter();
// Set initialized to true
initialized = true;
}
Tatiana
I found the answer -
I should have called DriverInit first; this code works fine:
Hello,
I am initializing the PDF Converter
private void Initialize()
{
// if already called then exit
if (initialized)
return;
// If not called than initialize it
cdiNet.DriverInit(Declarations.PrinterName);
//Enable the printer before each printout for the Developer version
cdiNet.EnablePrinter(Declarations.LicensedTo, Declarations.ActivationCode);
// Set FileNameOptions and output file name.
cdiNet.FileNameOptions = Declarations.NoPrompt + Declarations.UseFileName;
cdiNet.DefaultFileName = "C:\\Work\\PDFtest.pdf";
// Set the Printer as Default, this is needed only if you can not print to a specific printer
cdiNet.SetDefaultPrinter();
// Set initialized to true
initialized = true;
}
Tatiana
Re: set DefaultFileName
Hello,
You are right, DriverInit should be called once when launching your application followed by EnablePrinter().
Then you will call EnablePrinter() right before each print out.
Hope this helps.
You are right, DriverInit should be called once when launching your application followed by EnablePrinter().
Then you will call EnablePrinter() right before each print out.
Hope this helps.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html
Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark