Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I print Multi-Page TIFF files with ImageControls 2.0?

0
Posted

How do I print Multi-Page TIFF files with ImageControls 2.0?

0

To print a multi-page document, you will need to set DeviceMethod to Batch mode: KPrnt1.DeviceMethod = KPDEVICEMETHODBATCH Setup a global integer variable that will serve as a counter for the purpose of iterating through the pages in the document: Dim p_Counter as integer In the KPrnt BatchStart event, initialize the global counter to 1: p_Counter = 1 In the KPrnt PageStart event, set the PSFilename of the document that you want to print and the PSPage property. The PSPage property sets the page to to print and is set from the global counter. After setting the Filename, and before setting the PSPage property, you will first need to check the PSPageCount property and if the global counter is greater than the PSPageCount then set the Filename to “” which will terminate the batch: KPrnt1.PSFileName = “c:\imgctls\bin\sample1.tif” If p_Counter > KPrnt1.PSPageCount Then KPrnt1.PSFileName = “” Else KPrnt1.PSPage = p_Counter End If Now increment the global counter: p_Counter = p_Counter + 1 If

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123