[]
PdfSaveOptions.getPagePrintingEvent() event.Use this event data class to inspect the page being processed and determine whether the current page should be skipped from the output through setSkipThisPage(boolean).
worksheet.getRange("A1:A96").setValue(1);
PdfSaveOptions options = new PdfSaveOptions();
options.getPagePrintingEvent().addListener(new EventHandler<PagePrintingEventArgs>() {
public void invoke(Object sender, PagePrintingEventArgs e) {
if (e.getPageNumber() == 2) {
e.setSkipThisPage(true);
}
}
});
workbook.save(new ByteArrayOutputStream(), options);
final booleanfinal voidsetSkipThisPage(boolean value) getPageCount, getPageNumberThis property is typically used in the PagePrinting event to determine whether the page will be omitted when exporting or printing.
worksheet.getRange("A1:A96").setValue(1);
PdfSaveOptions options = new PdfSaveOptions();
options.getPagePrintingEvent().addListener(new EventHandler<PagePrintingEventArgs>() {
public void invoke(Object sender, PagePrintingEventArgs e) {
if (e.getPageNumber() == 2) {
e.setSkipThisPage(true);
boolean skipThisPage = e.getSkipThisPage();
}
}
});
workbook.save(new ByteArrayOutputStream(), options);
true if the current page should be skipped in output; otherwise, false.This property is typically used in the PagePrinting event to determine whether the page will be omitted when exporting or printing.
worksheet.getRange("A1:A96").setValue(1);
PdfSaveOptions options = new PdfSaveOptions();
options.getPagePrintingEvent().addListener(new EventHandler<PagePrintingEventArgs>() {
public void invoke(Object sender, PagePrintingEventArgs e) {
if (e.getPageNumber() == 2) {
e.setSkipThisPage(true);
}
}
});
workbook.save(new ByteArrayOutputStream(), options);
value - true if the current page should be skipped in output; otherwise, false.