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

RadDiagram to PDF/A-1a

7 Answers 48 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Affreux
Top achievements
Rank 1
Affreux asked on 19 Sep 2017, 02:57 PM

Hello, I need to convert a RadDiagram to PDF/A-1a. I managed to convert it as an image, but that's not good enough. I need a vector format, because I need the text in the shapes, and my custom templates. Converting to SVG would be good enough, I can try to take it from there.

I saw your sample in http://docs.telerik.com/devtools/wpf/controls/raddiagram/features/html-support, but I need images, and I use custom templates.

I tested the ExportToPdf sample in the SDK, and it looks like a good start. I was thinking of adding image and custom shape support to it, but if it doesn't export to PDF/A-1a in the first place, it's a non starter.

Is there a way to export a RadDiagram to a PDF/A-1a document, even if images and custom shapes aren't supported ?

7 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 22 Sep 2017, 07:50 AM
Hello,

Can you please clarify whether you had the chance to take a look at the Image Export article as I assume it would be useful to you in order to export the portion of the diagram to an image? If not, can you please review it and let me know in case further assistance is needed?

Regards,
Martin Vatev
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
nicolasf
Top achievements
Rank 2
answered on 26 Sep 2017, 07:46 PM

I'm also interested to export RadDiagram into PDF. And i need too a vector format.

Thanks for your help.

0
Martin Ivanov
Telerik team
answered on 29 Sep 2017, 09:04 AM
Hello Nicolas,

The ExportToPDF SDK example is the way to go. As I can see you already tried it. However, you need to export the control to PDF/A-a. Note that the RadDiagram control doesn't support exporting to PDF out of the box. Instead you can use the example which works with the RadPdfProcessing library. The document processing library doesn't support PDF/A-1a. Anyway, there is a feature that allows you to compile the document to the PDF standard when exported. You can read more about this in the How to Comply with PDF/A Standard article.

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Renier Pretorius
Top achievements
Rank 1
answered on 10 Oct 2019, 06:45 AM
Hi is there a "trick" to improving the quality of the PDF export. Please see attached 2 screenshots. I have used the code from the xaml-sdk/Diagram/ExportToPDF/ sample repository.
0
Martin Ivanov
Telerik team
answered on 14 Oct 2019, 10:00 AM

Hello Renier,

The ExportToPDF example is a custom solution that combines the RadDiagram control and the PdfProcessing framework to create a PDF document from scratch. However, the example is far from perfect for all the expected cases. There is no general trick to improve the final visualization (in the pdf) in your case. However, you can explore the example and see what elements from the Pdf model should be modified. More specifically, check the ExportHelper class which methods get a shape and create a Pdf models based on it. You can see how to move and customize elements with PdfProcessing and apply this in the ExportHelper class.

Regards,
Martin Ivanov
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.
0
Renier Pretorius
Top achievements
Rank 1
answered on 14 Oct 2019, 10:08 AM

Hi Martin,

Thanks for the feedback. In my scenario I just wanted a shareable copy of the complete diagram. I reverted to using the ExportToImage method on the diagram and it work perfectly for my needs, even though it it now a .png and not a .pdf.

 

Regards

Renier

0
Martin Ivanov
Telerik team
answered on 14 Oct 2019, 10:16 AM

Hello Renier,

Indeed, this is also a good approach. Note that you can use the PdfProcessing library to create a .pdf document with the created .png image. Also, if you need an image quality better than the one provided with the default export to image feature of RadDiagram, check the ExportToHighQualityImage SDK example.

Regards,
Martin Ivanov
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.
Tags
Diagram
Asked by
Affreux
Top achievements
Rank 1
Answers by
Martin
Telerik team
nicolasf
Top achievements
Rank 2
Martin Ivanov
Telerik team
Renier Pretorius
Top achievements
Rank 1
Share this question
or