-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Support PDF as output type #108
Comments
Rendering a SVG graphic or rendering a website to SVG? |
Rendering a website as SVG. I think there’s a way to use the pdf screenshot and Inkscape to get the SVG, but having that built-in would be helpful. |
I think generating SVG is out of scope for this package as there's no easy way to do it. However, I'm open to adding support for generating PDF in the When PDF is supported here, you could pass it to some kind of PDF-to-SVG converter. |
I was using this library to export png's and now for another project I need to export PDF's. I just changed diff --git a/node_modules/capture-website/index.js b/node_modules/capture-website/index.js
index f380b0d..156fb01 100644
--- a/node_modules/capture-website/index.js
+++ b/node_modules/capture-website/index.js
@@ -431,7 +431,8 @@ const internalCaptureWebsiteCore = async (input, options, page, browser) => {
screenshotOptions.clip = {x, y, width, height};
}
- const buffer = await page.screenshot(screenshotOptions);
+ const buffer = await page.pdf(screenshotOptions);
return buffer;
}; |
Would be a cool feature to have
The text was updated successfully, but these errors were encountered: