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

Printed pdf is not the same as the exported pdf

4 Answers 232 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Torben Pape-Haugaard
Top achievements
Rank 1
Torben Pape-Haugaard asked on 18 Apr 2017, 08:21 AM

Hi

I have a kendo chart, that im trying to export to pdf. This seems to work, however, when i try to print it out, it will make the lines into rectangles.

I'm guessing this somehow means that the pdf generated by this export method, creates some kind of invalid syntax, that is rendered wrong, when printed?

I'm 

$scope.bmiGraph.exportPDF({ paperSize: "auto", landscape: true, margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" } }).done(function (data) {
            kendo.saveAs({
                dataURI: data,
                fileName: "chart.pdf"
            });
        });

 

I have attached the two pdf files. "chart.pdf"("chart.zip") is the pdf generated by the "exportPDF" method. "chart_printed_as_pdf.pdf"("chart_printed_as_pdf.zip") is the result of what is printed from the pdf, which is 100% identical to what it will look like when printed out on normal paper.

How do i make the printed output identical to what the generated pdf?

There is also an error with the character encoding. Is there an easy fix to this aswell?

Best regards

 

4 Answers, 1 is accepted

Sort by
0
Torben Pape-Haugaard
Top achievements
Rank 1
answered on 19 Apr 2017, 07:14 AM

With "I'm" i meant to say, that "I'm using this code snippet:".

As an additional info, im using Kendo UI v2016.2.714.

0
Stefan
Telerik team
answered on 19 Apr 2017, 12:40 PM
Hello Torben,

Thank you for the provided files.

I received the same result when I printed the exported PDF on our printer. Still, if I export a regular Line Chart from our demos it is printed as expected.

Could you please provide a runnable example as it seems that the issue is connected to custom modifications which we are overlooking at this moment.

Also, I send this to the developers' team for further investigation on the exported PDF.

As for the encoding please check the following article on this matter:

http://docs.telerik.com/kendo-ui/framework/drawing/pdf-output#configuration-Custom

I will be expecting the example or get back to as soon as I have any information from the developers' team.

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 visualization (charts) and form elements.
0
Torben Pape-Haugaard
Top achievements
Rank 1
answered on 08 May 2017, 08:19 AM

Hello

Sorry for the long wait.

Here is a dojo to illustrate the problem: http://dojo.telerik.com/AHewa/10

When i click "Print bmi kurve" it downloads a PDF. When i open the PDF it looks good, but when i print it, i will draw some extra lines (like the PDF from the first post).

But it will work if i open and print if from chrome, but not if I open it with Adobe.

0
Stefan
Telerik team
answered on 10 May 2017, 07:36 AM
Hello Torben,

Thank you for providing the example.

After additional investigation, I noticed that it will only occur for the lines which are not entirely visible on the viewport due to the setting min and max properties.

When the whole line is visible, by setting the corresponding min and max, or by not setting them at all the printed document is as expected.

As the issue only occurs when exporting from Adobe, I can assume that they have a limitation in this scenario which is causing the undesired result.

Still, I forwarded it to our developer's team, for further investigation to ensure that the PDF exported document is correct.

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
Charts
Asked by
Torben Pape-Haugaard
Top achievements
Rank 1
Answers by
Torben Pape-Haugaard
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or