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
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?
I'm also interested to export RadDiagram into PDF. And i need too a vector format.
Thanks for your help.
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.
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.
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.
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.