C# example for PDF Print SDK

Good afternoon,

I am testing your  VeryPDF PDFPrint command line tool.  I am thinking about buying this tool, but I wanted to test your VeryPDF PDFPrint SDK tool.  I download this tool and am looking at youir c# example and it is not much help.  Do you have any other c# examples I could try using?

Thanks,
==========================
Hi,

"C#" folder in test package is the C# example, you can compile and run this C# example properly.

PDFPrint SDK does support all options which included in PDFPrint Command Line version, for example,

~~~~~~~~~~~~~~~~~~~~~~~~~~
        [DllImport("pdfprintsdk.dll")]
        public static extern int VeryPDF_PDFPrint(string CommandLine);

        public static long PrintDoc(string FullDocumentName, string PrinterName)
        {
            string PrintCommand = PrintCommandTemplate;
            if (LicenseKey != null)
                PrintCommand = PrintCommand.Replace("[LicenseKey]", LicenseKey);
            else
                PrintCommand = PrintCommand.Replace("[LicenseKey]", "XXXXXXXXXXXXXXXX");
            PrintCommand = PrintCommand.Replace("<PrinterName>", PrinterName).Replace("<DocFullPath>", FullDocumentName);

            MessageBox.Show(PrintCommand);
            return VeryPDF_PDFPrint(PrintCommand);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string appPath = Path.GetDirectoryName(Application.ExecutablePath);
            string strPDFFile = (appPath + "\\readme.pdf");
            long nRet = PrintDoc(strPDFFile, "docPrint");
            MessageBox.Show(nRet.ToString());
        }
~~~~~~~~~~~~~~~~~~~~~~~~~~

You can use PDFPrint Command Line to test the command line options first, and then pass the same command line options to VeryPDF_PDFPrint() function in PDFPrint SDK, then you will able to get PDFPrint SDK to print your PDF file correctly.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in PDF Print and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!