Declined
Last Updated: 19 Aug 2019 07:09 by ADMIN
Marco
Created on: 12 Aug 2019 14:46
Category: Kendo UI for jQuery
Type: Bug Report
0
Kendo UI Drawing API bug

Dear staff,

I am working extensively with Kendo UI Drawing API, specifically with drawDOM and exportPDF methods. I encountered a strange issue, which leads to the generation of corrupt PDF files.

 

After several attempts to analyze the problem, I found a small piece of code that allows to systematically reproduce the issue. You can find the code as attached.

 

Opening the example page with Chrome browser I got a corrupted PDF file, while Internet Explorer seems to generate a valid PDF file starting from the same source page.

 

Checking with an online PDF validator, the file generated by Chrome exploits this validation error:

    “The content stream contains an invalid operator.

      The operator has an invalid number of operands.”

 

I’m not skilled with PDF internals, but comparing the valid file of IE and the invalid file of Chrome, I noticed that an “infinite” value appears in the invalid PDF.

The row in the valid PDF is “1 0 0 -1 -9494.7900391 -9965.5996094 cm“, while the same row in the invalid PDF is “1 0 0 -1 Infinity Infinity cm”.

 

I noticed that the presence of an “Infinite” value is the common behavior whenever the corrupt PDF problem occurs.


Thanks in advance,
Marco Fortunato
Attached Files:
1 comment
ADMIN
Veselin Tsvetanov
Posted on: 19 Aug 2019 07:09
Hi Marco,

Thank you for the report and the sample code prepared. I have tested the case with both the version of Kendo that you use (2017.3.913) and the latest official (2019.2.619). While the invalid PDF is generated with version 2017.3.913, the latest release (R2 SP1 2019.2.619) successfully exports a valid PDF. Therefore, I would strongly recommend you to upgrade the Kendo version used to the latest, where the issue discussed is no longer present.

Here you will find a Dojo sample testing the suggested implementation with latest Kendo.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.