Hello Flexmonster Team,
We were wondering if it is possible to customize the PDF Export via GUI (things like scaling, output format size, header, footer, ...). We checked your documentation (https://www.flexmonster.com/doc/export-report/#pdf) and understand that many of those parameters can be set when calling the appropiate method. But we haven't found a (built-in) method to change these parameters for our end-users who only interact with the GUI.
In the same vein: Is it possible to see a preview of how the export would look like? We were thinking of something like the print-to-pdf dialog in word/windows.
Last question:
If none of those things are currently possible, is there a chance that they might be somewhere along your planned features roadmap?
Kind regards,
Florian
Hello, Florian!
Thank you for reaching out to us.
You are right that many PDF export settings can be customized via code, but are not directly exposed through the GUI by default. That said, there are several ways to offer more flexibility to your end-users.
Firstly, Flexmonster allows you to customize the toolbar, as explained in this article. Using this approach, you can replace the default export button or add a new one that calls the exportTo()
API with predefined parameters: https://jsfiddle.net/flexmonster/mugLx40n/
For implementing a preview alongside the custom export configuration, we recommend using the HTML export with destinationType
parameter set to "plain"
. This would generate an HTML string with the current grid and styles, which can be converted and saved as a PDF with external libraries like html2pdf. The exported HTML string can be added to the page layout to create a preview window. Also, with this approach, setting the export options can extend beyond what is available in the exportTo
API call. This can be done by modifying the exported HTML and setting the PDF file parameters like page orientation and size through the html2pdf options.
We have prepared an example showing the preview before exporting. This is a boilerplate you can customize and expand for setting export options: https://jsfiddle.net/flexmonster/5vzk81p7/
Please let us know if this approach would work for you.
Best Regards,
Maksym
Hello Maksym!
Thank you very much for your reply - I will forward your suggestions and examples to our developers.
Are there any plans on your side to include GUI-side customization options for PDF exports?
Kind regards,
Florian
Hello, Florian!
Thank you for your reply.
Currently, our main focus is developing the new version of Flexmonster, which is available for preview at https://prerelease.flexmonster.com/.
You can also check our Flexmonster 3.0 roadmap for planned features and improvements.
Because of this, we are not planning to introduce a UI view for customizing PDF exports in version 2.9.
Please let us know if any other questions arise.
Best Regards,
Maksym
Hello, Florian!
Hope you are doing well.
We are wondering if you had time to review the suggested approach for implementing a PDF export with preview via a custom pop-up.
Please let us know if this approach works for you.
Best Regards,
Maksym
Hello, Florian!
Just checking in to ask if you tried using the recommended approach with custom PDF export with on-page preview.
We are looking forward to hearing your feedback.
Best Regards,
Maksym