Possibility to export (XAML) view in PDF #13077
alessandro-gandolfi-ors
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Instead of directly doing PDF consider rendering to bitmap and - if necessary - draw bitmap to pdf. If pdf isnt absolutely necessary you can save bitmap directly as image file, somewhat like here AvaloniaUI/Avalonia.HtmlRenderer#10 |
Beta Was this translation helpful? Give feedback.
1 reply
-
See #13128, most likely |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Technically this feature was possible in versions before 11, since then a lot of classes can't be accessed and it's not possible without using reflection.
This could be useful when in a program someone would like to export charts or other dinamically rendered content.
With the headless platform, it could be even used to create a service to create a report (which is my goal).
It was previously possible with WPF but development and support are stale and it is limited to Windows, this could be a great opportunity for Avalonia to grow.
The 2 classes that could make this possible if made public again are DrawingContext and ImmediateRender as found in the example of https://github.com/Oaz/AvaloniaUI.PrintToPDF. Other implementations are also welcome if access to those classes has to remain as it is now.
Beta Was this translation helpful? Give feedback.
All reactions