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

missing resources when printing from chromium #411

Open
maxnikulin opened this issue Apr 21, 2017 · 0 comments
Open

missing resources when printing from chromium #411

maxnikulin opened this issue Apr 21, 2017 · 0 comments

Comments

@maxnikulin
Copy link

Chromium (linux) does not wait for images when Window.print() is invoked.
As a result a grid exported to PDF may look not so pretty as expected.

The issue may be reproduced using tests/test_grid_printer.html
I use echo_sleep option in nginx to simulate some delay (1s)
in loading of tests/support/data/status.png file. It real life
it may happen due to network latency. Sometimes that
delay is not necessary at all.

  1. Load test_grid_printer.html page

  2. Check the following options:

    • Use CSS File
    • Use Formatters

    and maybe Row Count

  3. Click Print

  4. Maximize the print popup window (it can be blocked by browser,
    that case enable it)

  5. Ensure that "background" is checked in the chromium
    print preview options.

Status icons are absent in the print preview window and it is a bug.

If Window.print() is invoked with some timeout
https://github.com/oria/gridx/blob/master/support/printer.js#L93
then there is no problem with images.

It seems that the export window have to wait for some event (load?).
Unfortunately it can not be done by printer.js since that script
belongs to original page. Maybe a script that initiates print
should be injected into the generated export page.

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

1 participant