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

exportPDF and Embedded Base64 PNGs

1 Answer 164 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 29 May 2015, 09:40 AM

Hi

I am currently trialing your product. Everything is working, with the sole exception of an issue that occurs when attempting to export a diagram to PDF, which is a crucial requirement.

Part of the requirement is that all PNGs used in the diagram must be embedded using Base64 Encoding, rather than the source URL of the image

i.e.

group.append(new dataviz.diagram.Image({
      source: "data:image/png;base64," + BASE64_STRING,
      x: 9,
      y: 20,
      width: 38,
      height: 38
    }));

This is working nicely both on screen and when exporting the diagram to SVG. However, when exporting to PDF, the chart is rendered without the embedded images.

Any advice would be very much appreciated. 

 

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 01 Jun 2015, 11:56 AM

Hello Ed,

I've tried this in the Dojo and it seems to work fine. From the top of my mind I can say that this won't work in IE9 and below as it lacks support for Canvas.

Can you spot any differences with your code?

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Diagram
Asked by
Ed
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or