Output Blank Page when there is Nothing to Print

Possible Usage Scenarios

If the sheet is empty, then Aspose.Cells for Python via .NET will not print anything when you export a worksheet to an image. You can change this behavior by using the ImageOrPrintOptions.output_blank_page_when_nothing_to_print property. When you set it to true, it prints a blank page.

Output Blank Page when there is Nothing to Print

The following sample code creates an empty workbook that contains an empty worksheet and renders the empty worksheet to an image after setting the ImageOrPrintOptions.output_blank_page_when_nothing_to_print property to true. Consequently, it generates a blank page because there is nothing to print, which you can see in the image below.

todo:image_alt_text

Sample Code