We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Optimize PDF creating from huge spreadsheet

Hello,

I have huge spreadsheets (about 1000 rows x 500 cols + images per sheet).
I want to prepare file to view as pdf using Viewer with spreadsheetOptions: ForOnePagePerSheet option.

var viewer = new Viewer(stream, loadOptions);  

...

viewer.View(pdfViewOptions, cancellationToken);

Output is converted correctly (1 sheet to 1 page, after zooming document is readable) but the document:

  • is very heavy (xlsx spredsheet 1,6MB, pdf output 11MB)
  • when I open document for example in document reader rendering take a very long time, also in others viewer

Can you give some advice to make output document more responsive (and smaller)?
Any optimized options etc?

I Use .NET 6 and GroupDocs.Viewer 22.11.0

@D04486411

Thank you for sharing the details.

There are no optimization options available when rendering to PDF. Can you please attach a sample file so we take a look and see what we can do here?

Here is sample file compressed to 7z. I can’t attach output file because size limit.
sample.7z (188.5 KB)

@D04486411

Thank you for attaching the sample input file. We’ll take a look at what optimizations we can apply and update you.

@D04486411

At the moment we can add a property to enable the following optimizations: do not embed common fonts like Arial and Times New Roman, and optimize the file structure to reduce the size. When applied to the file you attached output size is reduced by 41% to 6.61 MB from 11.2 MB. Links to both optimized.pdf and not-optimized.pdf files.
In case you’re OK with such optimizations we can add this property to enable them in the upcoming release.

It would be great if you included these options. Can you also add an option for pdf linearisation?
When can we expect a new release?

Regards

@D04486411

We’ll investigate if linearisation can be added and update you.

We have plans to publish the next version by the end of the next week.

1 Like

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

  Issue ID(s): VIEWERNET-4211

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@D04486411

This feature was shipped in GroupDocs.Viewer 23.1. The package is available at NuGet and GroupDocs.Downloads.

Have a nice day!