Provide a way to convert any UIElement visualtree to a PDF
Hello Borislav, Understood. If anything changes please do report it. -Patrick
Hello Patrick, extending the example to support ViewBox is currently not in our immediate plans, as we have more pressing tasks for the following releases. I will log the request internally, but I cannot commit to a specific time frame.
Borislav, Thank you for the detailed information. I would like to dive in and get this working but we are rather tight on resources at the moment, could telerik perhaps add the viewbox feature to the ExportUIElement project? I understand this isn't easy but it would be greatly appreciated if possible. Thank you, Patrick
ViewBox is not supported out of the box. You can try to implement a concrete renderer for it here: https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/ExportUIElement/PdfExport/ConcreteRenderers , but it won't be so straight-forward. The problem is that the base renderer implementation uses only the RenderTransform and LayoutTransform properties of the UI elements (see here: https://github.com/telerik/document-processing-sdk/blob/master/PdfProcessing/ExportUIElement/PdfExport/Miscellaneous/MathHelper.cs#L45-L52 ) to obtain transformations. It seems that ViewBox uses ContainerVisual.Transform (https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.containervisual.transform?view=netframework-4.7.2#System_Windows_Media_ContainerVisual_Transform ), but I am not sure exactly how. You can probably check the internal implementation: https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/ViewBox.cs,358 .
No problem, thank you for the quick response. Does this work for elements within a Viewbox? The previous version did not. Could that functionality be added? Thanks, Patrick
Hello Patrick, this is the valid link: https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/ExportUIElement We moved the Telerik Document Processing to a separate repo, which broke the old links, sorry for this.
Link is no longer available. Do you have a new one?
Such functionality was implemented as an SDK demo here: https://github.com/telerik/xaml-sdk/tree/master/PdfProcessing/ExportUIElement, so this item will be closed.