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

Fix to work Chrome's BGPT feature in preview window #78

Merged
merged 3 commits into from
Mar 19, 2019
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Mar 19, 2019

Puppeteer v1.13.0 (Updated in #76) has disabled BGPT feature due to Chrome's bug in capturing screen shot. We following this decision when converting to PDF and image.

But it would revert element's incorrect positioning when opened preview window by --preview option. This problem can show by using <video> element in Markdown with --html option.

echo '<video src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" autoplay muted controls />' | npx @marp-team/marp-cli --html -p --no-output

We have to override --disable-features option to prevent disabling BGPT. It will get back an expected scaling.

Requires Chrome Canary. A stable Chrome still has incorrect rendering.

@yhatt yhatt merged commit 0bf9943 into master Mar 19, 2019
@yhatt yhatt deleted the fix-bgpt-preview branch March 19, 2019 04:08
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

Successfully merging this pull request may close these issues.

1 participant