[]
Provides data for the PagePrinting and PagePrinted events.
This event data class supplies page-related information for print processing, including the 1-based page number of the current page and the total page count.
public class PagePrintEventArgs : EventArgs
Public Class PagePrintEventArgs
Inherits EventArgs
worksheet.Range["A1:A96"].Value = 1;
PdfSaveOptions options = new PdfSaveOptions();
options.PagePrinting += (sender, e) =>
{
int pageNumber = e.PageNumber;
int pageCount = e.PageCount;
};
using MemoryStream stream = new MemoryStream();
workbook.Save(stream, options);
| Name | Description |
|---|---|
| PagePrintEventArgs() |
| Name | Description |
|---|---|
| PageCount | Gets the total number of pages associated with the current page printing event. This value represents the total page count for the print operation that raised the current PagePrintingEventArgs or PagePrintedEventArgs instance. |
| PageNumber | Gets the 1-based page number associated with this event. This value identifies the page currently being processed in the PagePrinting or PagePrinted event sequence. |