Optimize spreadsheets in a PDF file

On this page

This optimization allows to reduce the output file size by setting up border lines. Besides that, it removes the Arial and Times New Roman characters of 32-127 codes.

The default value is False.

The following code snippet shows how to optimize spreadsheets in a PDF file:

with gv.Viewer("invoice.xlsx") as viewer:

    viewOptions = gvo.PdfViewOptions()
    viewOptions.pdf_optimization_options = gvo.PdfOptimizationOptions()
    viewOptions.pdf_optimization_options.optimize_spreadsheets = True

    viewer.view(viewOptions)

On this page