DEV Community

Atir Tahir
Atir Tahir

Posted on

2 2

Document conversion with zoom option

When you are converting a document to a Spreadsheet (e.g. PDF to Excel, Word to Excel), you can now set the output document zoom level.

using (Converter converter = new Converter("sample.docx", getLoadOptions))
{
    SpreadsheetConvertOptions options = new SpreadsheetConvertOptions
    {
        PageNumber = 2,
        PagesCount = 1,
        Format = SpreadsheetFileType.Xls,
        Zoom = 150
    };
    converter.Convert("converted.xls", options);
}
Enter fullscreen mode Exit fullscreen mode

Have a look at the source file:

Alt Text

And the following output, image at left hand side is 150% zoomed in and the other one is 60% zoomed in

Alt Text

All you have to do is to add this DLL reference in your project. In case of any issue, post it here.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay