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

Electron capturePage needs a delay or capturePage Images may not have all content #166

Closed
codecounselor opened this issue Feb 9, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@codecounselor
Copy link
Collaborator

codecounselor commented Feb 9, 2017

The problem is that when capturePage is used to export a PNG image, the contents of the page have been found to be partially missing in some cases.

Someone made an attempt to add a view-painted event to webContents in place of a timeout but it proved not to work and it was removed.
The history is captured here: electron/electron#6622

This task is to add a small 100ms timeout before invoking capturePage when a PNG is being exported.

If a client is using the waitForJSEvent option they can also insert a timeout before emitting the ready event.

Allow the delay to be overridden with a ELECTRONPDF_PNG_CAPTURE_DELAY env property

@codecounselor codecounselor added this to the 1.1.6 milestone Feb 9, 2017
@codecounselor codecounselor self-assigned this Feb 9, 2017
codecounselor pushed a commit to codecounselor/electron-pdf that referenced this issue Feb 9, 2017
codecounselor pushed a commit to codecounselor/electron-pdf that referenced this issue Feb 9, 2017
codecounselor pushed a commit to codecounselor/electron-pdf that referenced this issue Feb 9, 2017
@codecounselor codecounselor changed the title Electron capturePage needs a delay or images may not have all content Electron capturePage needs a delay or capturePage Images may not have all content Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant