Accusoft.PrintPro8.Net
Print a Multi-page TIFF Image Using PrintPRO & ImagXpress

This example uses an ImagXpress control to load a multi-page (TIFF, PDF, ICO, MODCA or DCX) file, PrintPRO then prints them, one page at a time.

Example
Copy Code
//generic Printer object, this is a real printer or a file depending on the user's selection
Accusoft.PrintProSdk.Printer printer;  
Accusoft.PrintProSdk.PrintJob job;    // object representation of a print job

/* prompt the user for the desired printer */
printer = Accusoft.PrintProSdk.Printer.SelectPrinter(pp,true);

if (printer != null)
{
  // Create a PrintJob object for the above-selected Printer.
  // If the printer is not specified, PrintPRO will use Window's default printer.
  job = new Accusoft.PrintProSdk.PrintJob(printer);
  job.Name = "Accusoft PrintPRO Demo";

  int i = 0;
  int numPages = Accusoft.ImagXpressSdk.ImageX.NumPages(ix, "c:\\multi.tif");
  for(i = 1; i <= numPages; i++)
  {
     if (i > 1)
     { 
          job.NewPage();
      }
       ixvPreview.Image = Accusoft.ImagXpressSdk.ImageX.FromFile(ix, "c:\\multi.tif", i);
       job.PrintDib(ixvPreview.Image.ToHdib(false), 0,0,0,0, job.LeftMargin, job.TopMargin,
               job.PrintWidth - job.LeftMargin, job.PrintHeight - job.TopMargin - job.BottomMargin, true);
      }
  }
  // Finish the print job to the end of the current page and print the document
  job.Finish();
}

 

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback