ExcelConversionOptions.PageScaling Property

Gets or sets the Excel page scaling.

public ExcelPageScaling PageScaling { get; set; }

Property Value

ExcelPageScaling

Licensing Info

This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples

Example shows how to apply conversion options to specific worksheet.
using ceTe.DynamicPDF.Conversion;

class MyClass
{
    static void Main()
    {
        // Create new instance of Converter by providing suitable parameters.
        ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx");
       
        excelConverter.DocumentParsing += new ExcelDocumentParsing(xlConverter_DocumentParsing);
        
        //Call Convert method to start conversion
       excelConverter.Convert(@"C:\MyOutput.pdf");
    }
    static void xlConverter_DocumentParsing(object sender, ExcelDocumentParsingEventArgs e)
    {
        foreach (ExcelWorksheet excelWorksheet in e.Worksheets)
        {
            ExcelWorksheetConversionOptions excelWSOptions = excelWorksheet.ConversionOptions;
            ExcelPageScaling xlPageScaling = excelWSOptions.PageScaling;
            ZoomExcelPageScaling zoomxlPageScaling = xlPageScaling.ZoomExcelPageScaling;
            zoomxlPageScaling.ZoomPercentage = 50;
            excelWorksheet.ConversionOptions.DefaultToFile = false;
        }
     }
}

See Also

ExcelConversionOptions
ceTe.DynamicPDF.Conversion