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

PDF font url

1 Answer 109 Views
Drawing API
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 19 Apr 2016, 03:30 PM

I'm trying to set up some PDF exporting for an application running on an IBM Domino server. I'm trying use the DejaVu font stored locally, and whenever I try to generate the PDF the GET request for the font appends ?v=1.1 to the end and apparently this server does not like that; gives a 'Bad Request" error. Is there an API way I can not have the ?v=1.1 append to the GET request? Or can I use the long form of jquery ajax call so I can specify url as parameter rather than using .then()?

Example code: (pretty much the same as the online demo example)

// Convert the DOM element to a drawing using kendo.drawing.drawDOM
        kendo.drawing.drawDOM($(".content-wrapper"))
        .then(function(group) {
            // Render the result as a PDF file
            return kendo.drawing.exportPDF(group, {
                paperSize: "auto",
                margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" }
            });
        })
        .done(function(data) {
            // Save the PDF file
            kendo.saveAs({
                dataURI: data,
                fileName: "PDF-Sample.pdf"
            });
        });

Example GET request when code above is executed:

https://servername/path/fonts/DejaVu/DejaVuSans-Bold.ttf?v=1.1

 

1 Answer, 1 is accepted

Sort by
0
Alan
Top achievements
Rank 1
answered on 19 Apr 2016, 03:41 PM
Ignore this question; was reading another forum post (http://www.telerik.com/forums/pdf-drawing-requires-dejavu-font) and had forgotten that the font would be defined in the CSS. Made a custom modified version of my style sheet with the ?v=1.1 removed and all worked well.
Tags
Drawing API
Asked by
Alan
Top achievements
Rank 1
Answers by
Alan
Top achievements
Rank 1
Share this question
or