Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VueHtml2PDF not rendering some elements #137

Open
ccperegrine opened this issue May 23, 2022 · 0 comments
Open

VueHtml2PDF not rendering some elements #137

ccperegrine opened this issue May 23, 2022 · 0 comments
Assignees

Comments

@ccperegrine
Copy link

ccperegrine commented May 23, 2022

I have a fairly complex report that I aim to export using VueHTml2Pdf - All seemed to be going ok until I added a section which has to loop through data, creating a dynamic page for each grouping.

I noticed that once this report got slightly larger then it just stopped rendering certain elements. In the screenshots attached, the 'circle' div on the right hand table stops showing. Everything still renders as expected on the screen , but just doesn't show up in the pdf. At points while I have been looking for workarounds, I have also seen sections of the charts not rendering correctly . It appears to reach a certain point in the report and just stop rendering certain elements from then on

I have managed to temporarily fix this by changing the option :pdf-quality to 1 from 2, which then allows the whole report to render as expected, but this is not ideal as we would be looking to print the report and this loses quite a lot of quality on the images in other sections. I am also concerned that as the report grows further I will have to reduce this further, which isn't really a viable option

Is there a limit on how much data this can handle, and if so, is there a way of generating sections of the report individually, and then combining all the pages at the end into a single report?

Update

Resolved using the core html2pdf library by generating page by page, using this solution:

eKoopmans/html2pdf.js#19 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants