PDF font url

2 posts, 0 answers
  1. Alan
    Alan avatar
    12 posts
    Member since:
    Apr 2013

    Posted 19 Apr Link to this post

    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

     

  2. Alan
    Alan avatar
    12 posts
    Member since:
    Apr 2013

    Posted 19 Apr Link to this post

    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.
  3. Kendo UI is VS 2017 Ready
Back to Top