Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

PDF export very slow

Answered
Richard asked on January 22, 2020

Hi,
We have a few reports that are quite large, that we export to PDF. This works well and the export runs fast. However, when I add a header to the PDF, the export slows down considerably. 
I prepared an example to illustrate the problem: https://codepen.io/Rarets/pen/ZEYVNqp
Is there any way to speed this up? It seems like the header is generated for each page individually instead of just once.
If there would be an option to only add the header to the first page of the PDF file, that would also be acceptable for now.
 
Kind regards,
Richard

4 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 22, 2020

Hello, Richard
 
Thank you for reaching out to us.
 
We would like to kindly explain that the current implementation of adding headers and footers to the page considers the possibility of difference between each added element (i.e., page number). That is the reason why the new header is generated for each page, and the speed decreases. 
 
However, your suggestion sounds reasonable, and we are going to increase the speed of import in case added elements are the same.
 
Our development team will research possible solutions, and we will notify you about results with the ETA 24 Feb.
 
For now, as a workaround, we would like to suggest creating a title containing the required information right before export and delete it after the export is completed. Such an implementation will add the “header” to the first exported page without loss of the speed.
 
Please check out an example demonstrating such an approach.
 
Best regards,
Illia

Public
Richard January 23, 2020

Hi Illia,
 
Thank you for your answer, this is very helpful. The workaround works well for now.
 
However, I would like to ask you to remove the example on fiddle (https://jsfiddle.net/flexmonster/nmzo723L/), because there’s some private data in that example.
 
Thanks again! 

Best regards,
Richard
 

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 23, 2020

Hello,
 
We are happy that the suggested workaround fits you for now.
 
We will keep you posted with any updates.
 
Also, the data set of the mentioned JSFiddle was replaced.
 
Please contact us in case of additional questions.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster February 25, 2020

Hello, Richard,
 
We are glad to inform you that export time for export to PDF with custom headers was improved.
 
This is available in the 2.8.1 version of Flexmonster: https://www.flexmonster.com/release-notes/
 
You are welcome to update the component.
Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/ 
 
The guide dedicated to migration from 2.7 to 2.8 can be found following the link: https://www.flexmonster.com/doc/migration-guide-from-2-7-to-2-8/
 
Please let us know if everything works fine for you.
 
Best Regards,
Illia

Please login or Register to Submit Answer