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)