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

render from html string #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

render from html string #61

wants to merge 2 commits into from

Conversation

daweedm
Copy link

@daweedm daweedm commented Feb 13, 2020

allow rendering pdf from html string

Copy link
Owner

@Szpadel Szpadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.d.ts also needs to be updated for public funcitons

@@ -109,6 +122,46 @@ class RenderPDF {
renderer.killChrome();
}

async renderPdfFromHtml(html, options) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost the same function as renderPdf common functionality should be extracted to common place,
maybe something like renderPdfCb((page) => {...}, options)

@@ -6,9 +6,6 @@
"license": "MIT",
"repository": "https://github.com/Szpadel/chrome-headless-render-pdf",
"engineStrict": true,
"bin": {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot be like that for MR

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.

2 participants