This is a migrated thread and some comments may be shown as answers.

saveAsPDF - Options

1 Answer 141 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 14 Mar 2017, 09:24 AM

Hi,

 

I'm trying to get a diagram to generate a PDF file.

I've successfully persuaded it to output in landscape format using information from http://docs.telerik.com/kendo-ui/api/javascript/drawing/pdfoptionsbut I would also like to modify the output file's name and adjust other aspects of the output the code I'm, using is below:

function PrintDiagram() {
    var filename = jsonDiagram.Name.replace(/[^a-z0-9]/gi, '_').toLowerCase();
    findControl('input','EmpName').Value
    Telerik_Diagram.pdf = {
        creator: "Actis CRM",
        fileName: filename + '.pdf',
        subject: jsonDiagram.Name,
        title: jsonDiagram.Name,
        paperSize: "A4",
        landscape: true
    }
    Telerik_Diagram.saveAsPDF();
}

hopefully fairly self explanatory.

As I say the result is a diagram pdf that is correctly oriented but the file name is still the default 'export.pdf' and the pdf producer (I assume should map to 'creator) is still  Kendo UI PDF Generator v.2016.3.913. There is no title, author or subject either (see attached)

What am I doing wrong here?

 

Alan

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 16 Mar 2017, 07:28 AM
Hello Alan,

These options can be set directly from the Diagram public API.

Please check the available options which can be modified:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram#configuration-pdf

I made a Dojo example demonstrating these:

http://dojo.telerik.com/ElEnA

I hope this will help to achieve the desired result.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Diagram
Asked by
Alan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or