svgexport
svgexport copied to clipboard
Protocol error: Unable to capture screenshot
- Install
svgexport
PS C:\> npm i svgexport -g
added 48 packages, and audited 49 packages in 11s
found 0 vulnerabilities
- Run with error (svg from Fontawesome)
PS C:\> svgexport .\play-solid.svg .\play-solid.png 64x
Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot
Versions
Windows 10.0.18363
[email protected]
[email protected]
[email protected]
Had the same error. Installed using `npm install svgexport -g'.
First a just ran the command without any parameters, and it worked fine.
When trying to export a higher resolution png, I got the error:
$ svgexport.cmd hicetnunc-v0.1.svg hicetnunc-v0.1-25000pixels.png 25000:25000
Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot
It seems it is a Puppeteer issue because of file size.
That appears to be correct. I realize now that I used 64x
instead of 64:64
.
It seems it is a Puppeteer issue because of file size.
Is there a way to solve it? Or at least find a way around this issue?
I would like to be able to export high dimensional/quality images.
Yeah, makes sense. The issue is not specific to svgexport, so if you search for the error on the web you will find some suggestions, for example if you running in a docker container you may be able to fix it by adding more RAM.
Another option/hack might be to export one portion of image at a time using input size parameters, and then merge them together using another tool.
I was trying to export the Ghostcript_Tiger.svg in 20x and got this error, but looking at the issues reported here I used version 0.3.2 and it exports correctly. however version 0.4.x does output this error. My computer has 51GB of free ram (64GB installed).