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

How to convert page that is loading data? #37

Closed
denisvolokh opened this issue Sep 23, 2015 · 8 comments
Closed

How to convert page that is loading data? #37

denisvolokh opened this issue Sep 23, 2015 · 8 comments

Comments

@denisvolokh
Copy link

Hi,

I have page that is populating grid from external resource via rest api. After converting page with pdfkit the table is empty.

Can pdfkit wait until all data is loaded?

@mmarchini
Copy link
Contributor

You probably want these options:

--window-status <windowStatus>  Wait until window.status is equal to this
                                string before rendering page
--javascript-delay <msec>       Wait some milliseconds for javascript
                                finish (default 200)
--no-stop-slow-scripts          Do not Stop slow running javascripts

--window-status is probably the best option here, because you can control exactly when your page will be rendered by wkhtmltopdf

Maybe these links will help too:
http://wkhtmltopdf.org/usage/wkhtmltopdf.txt
https://groups.google.com/forum/#!msg/wkhtmltopdf-general/vWDe5hUAyJ8/2XbXM2g1ZtYJ:
http://stackoverflow.com/questions/15837932/wkhtmltopdf-with-javascript-delay-not-working

@denisvolokh
Copy link
Author

Thank you your hint. I am going to try window status.

@denisvolokh
Copy link
Author

Looks like there is problem with rendering when link is in this format www.site.com/#/invoice but it works when I put page like www.site.com/invoice.html.

I could not find any options for this case.

@mmarchini
Copy link
Contributor

Are you using any framework (Angular, Backbone, Ember, etc.)? Have you tried rendering this page manually with wkhtmltopdf from the command line?

@AhmedJaballah
Copy link

Hi,
I have the same issue i have tryed with the options :
--javascript-delay
--no-stop-slow-scripts

But no way plz help

@anuj-bluebash
Copy link

Getting blank pages for React App pages

@JazzCore
Copy link
Owner

Looks like wkhtmltopdf issue, since it does page parsing and processing, closing.

Sorry that it took so long for me to get to it...

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

6 participants
@denisvolokh @JazzCore @mmarchini @AhmedJaballah @anuj-bluebash and others