Output Blank Page when there is Nothing to Print

Possible Usage Scenarios

If the sheet is empty, then Aspose.Cells will not print anything when you export a worksheet to an image. You can change this behavior by using ImageOrPrintOptions.OutputBlankPageWhenNothingToPrint property. When you set it to true, it will output 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.OutputBlankPageWhenNothingToPrint 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