Hi there,
are they any samples in c# managed code.
Giuseppe
c# examples
Hello,
Below is C# code snippet which illustrates how to implement the PDF Converter. Hope this helps?
private void btnPrintTextObject_Click(object sender, System.EventArgs e)
{
CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfExClass() ;
PDF.DriverInit ( PDFprinter);
PDF.DefaultDirectory = "c:\\temp";
//Complete path of resulting PDF document
PDF.DefaultFileName = "c:\\temp\\fromCsharp.pdf";
//Set printer as default
PDF.SetDefaultPrinter();
PDF.FileNameOptionsEx = (int)(sNoPrompt + sUseFileName);
PDF.EnablePrinter (strLicenseTo, strActivationCode);
//Print Something
printDocument1.Print();
PDF.RestoreDefaultPrinter();
PDF.FileNameOptions = 0;
}
Thanks
Below is C# code snippet which illustrates how to implement the PDF Converter. Hope this helps?
private void btnPrintTextObject_Click(object sender, System.EventArgs e)
{
CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfExClass() ;
PDF.DriverInit ( PDFprinter);
PDF.DefaultDirectory = "c:\\temp";
//Complete path of resulting PDF document
PDF.DefaultFileName = "c:\\temp\\fromCsharp.pdf";
//Set printer as default
PDF.SetDefaultPrinter();
PDF.FileNameOptionsEx = (int)(sNoPrompt + sUseFileName);
PDF.EnablePrinter (strLicenseTo, strActivationCode);
//Print Something
printDocument1.Print();
PDF.RestoreDefaultPrinter();
PDF.FileNameOptions = 0;
}
Thanks
-
- Posts: 22
- Joined: Thu Oct 03 2002
- Location: Germany
C# Samples
Hi,
thanks. We try to use the CDIntfNet.dll.
...
public event CDIntf.eveEnabledPre oPDFc_EnablePr;
...
oPDFc = new CDIntf.CDIntfControl();
oPDFc.DriverInit ("myprinter");
try
{
oPDFc.EnablePrinter(strCompany,strSerial);
oPDFc.DefaultDirectory = "c:\\";
oPDFc.DefaultFileName = "c:\\test.pdf";
oPDFc.CaptureEvents (true);
}
catch
{
}
1.)The problem is that we get no event. The oPDFc.EnabledPre is not compatible with the System.EventHandler.
2.)There is no FileNameOptionsEx funktion.
Giuseppe
thanks. We try to use the CDIntfNet.dll.
...
public event CDIntf.eveEnabledPre oPDFc_EnablePr;
...
oPDFc = new CDIntf.CDIntfControl();
oPDFc.DriverInit ("myprinter");
try
{
oPDFc.EnablePrinter(strCompany,strSerial);
oPDFc.DefaultDirectory = "c:\\";
oPDFc.DefaultFileName = "c:\\test.pdf";
oPDFc.CaptureEvents (true);
}
catch
{
}
1.)The problem is that we get no event. The oPDFc.EnabledPre is not compatible with the System.EventHandler.
2.)There is no FileNameOptionsEx funktion.
Giuseppe
Hello,
Please send this issue to support@amyuni.com
Also please note that you can use FileNameOptions instead of FileNameOtionsEx and you mainly need to call EnablePrinter before printing.
Thanks
Please send this issue to support@amyuni.com
Also please note that you can use FileNameOptions instead of FileNameOtionsEx and you mainly need to call EnablePrinter before printing.
Thanks