Exemplo n.º 1
0
        public void PrintWaterMark()
        {
            CDIntfEx.Document oDoc = new CDIntfEx.DocumentClass();
            oDoc.SetLicenseKey(strLicenseTo, strActivationCode);
            oDoc.Open(getSampleWorkingDirectory() + "Source_Docs\\fivepages.pdf");
            int nPageCount = oDoc.PageCount();

            oDoc.Print("", 1, nPageCount, 1);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Print existing PDF document
        /// The Print method can be used to print a PDF document to a hardware printer. It is also used to print
        /// multiple pages on a single sheet of paper.This method is available only in the professional
        /// version of the Amyuni PDF Converter product.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PrintPDFDoc()
        {
            CDIntfEx.Document PDFDoc = new CDIntfEx.DocumentClass();


            PDFDoc.OpenEx(getSampleWorkingDirectory() + "Source_Docs\\fivepages.pdf", "");

            PDFDoc.SetLicenseKey(strLicenseTo, strActivationCode);

            //Parameters
            //PrinterName
            //[in] Name of printer as it shows in the printers control panel.
            //If this parameter is left empty, the document will print to the default printer
            //StartPage
            //[in] Page number from which to start printing. The index of the first page is 1
            //EndPage
            //[in] Page number at which to stop printing
            //Copies
            //[in] Number of copies to print the document

            PDFDoc.Print("", 1, PDFDoc.PageCount(), 1);
        }