Standard print options in PDF

1 Answer 55 Views
Drawing API
Michael
Top achievements
Rank 1
Iron
Michael asked on 02 Jun 2023, 11:37 AM

Hi,

Is there any way to set the standard print options like "fitting content to print area" or "standard print page size'" while creating a PDF from the drawing API?

    let pdfOptions = {
        paperSize: 'a3'
        landscape: true,
       

//something like this
      printOptions = {
             fitContentToPrintArea: true,
             paperSize: 'a4'
       }
    };

        kendo.drawing.exportPDF(root, pdfOptions).done(function (data) {
            kendo.saveAs({
                dataURI: data,
                fileName: fileName
            });
        });

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 07 Jun 2023, 06:05 AM

Hi Michael,

I am afraid that there is no option that will fit the content automatically on the page.

You can either set the paperSize to 'auto', thus the entire content will fit on the page, but the paper size will be determined by content. Or you can use the scale option: - https://docs.telerik.com/kendo-ui/framework/drawing/pdf-output/scaling to scale the content.

I hope you will find the provided information helpful. 

 

Regards,
Neli
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Tags
Drawing API
Asked by
Michael
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
Share this question
or