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

Not showing anything if there's more than a certain amount of pages #776

Open
Malvov opened this issue Nov 11, 2018 · 2 comments
Open

Not showing anything if there's more than a certain amount of pages #776

Malvov opened this issue Nov 11, 2018 · 2 comments

Comments

@Malvov
Copy link

Malvov commented Nov 11, 2018

Hi guys.

I'm trying to print a report which has many pages, 70 at least I think. But when generating the pdf, it just renders nothing and the console doesn't show the "Completed Ok" message or any other message at all. If I open to the temporary file that appears on the console prior to generating the pdf, the content's ok but the page where it's suppose to show the pdf stays blank.

What I'm aiming to is to show all events per day in a week associated to employees between a range of dates, in this case, 1 whole month. If I select just one week, it works fine. It will print 14 pages and that's the max amount of pages I've ever gotten in this application.

Has anyone else experienced this? Does the gem have an issue for printing that many pages?

Rails version: 5.0.3
Ruby version: 2.5.0

Thank you very much.

@deepakmahakale
Copy link

@Malvov were you able to fix this issue? we are currently facing a similar where the PDF generated has 15-20 + pages.
Randomly the PDF is generated with blank pages and just a header and footer.
No actual content

@unixmonkey
Copy link
Collaborator

Is the PDF content rendered with Javascript, like it might not render anything if React/Ember/Angular don't load? You might be "sometimes" running into a timeout for waiting on JS to render the page, at which point wkhtmltopdf gives up and prints the page as it looks at that point in time, which might be a blank page. You can try experimenting with adding an option like javascript-delay: 50000.

Also, this is almost certainly not an issue with WickedPDF, but with wkhtmltopdf, which WickedPDF uses for the actual PDF generation. Maybe something in one of these links helps you find what's happening in your specific case: https://www.google.com/search?q=wkhtmltopdf+blank+pdf+site:stackoverflow.com

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

No branches or pull requests

3 participants