DEV Community 👩‍💻👨‍💻

Atir Tahir
Atir Tahir

Posted on

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.

Top comments (0)

Become a Moderator Do you want us to help make DEV a better place?

Fill out this survey and help us by becoming a tag moderator here at DEV.