Open EkSulfur opened 3 months ago
I have the same problem – I don't know since when it exists, but I recently upgraded two Chrome installations to v127.0.6533.x, and with both I see the same behaviour (VSCode v1.91.1, Markdown Preview Enhanced v0.8.13).
I see in the task explorer that several Chrome instances have been started, but they seem to "hang" and don't finish the MD → PDF conversion, thus producing no output 😢.
Same here.
VS shows the follwoing error:
RG: Protocol error (Page.printToPDF): Invalid parameters Failed to deserialize params.pageRanges - BINDINGS: string value expected at position 833
Hi @engelhro , @EkSulfur
I found out, that I had pageRanges with no value defined in the yaml settings
puppeteer:
format: "A4"
landscape: false
timeout: 3000 # <= Special config, which means waitFor 3000 ms
pageRanges: # e.g. 1-5 <-- this line caused the error
printBackground: false #true
margin:
top: '15mm'
bottom: '15mm'
left: '20mm'
right: '20mm'
according to https://github.com/puppeteer/puppeteer/blob/v1.9.0/docs/api.md#pagepdfoptions:
pageRanges <string> Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
emtpy strings would be allowed.
I did not change the settings recently but pdf export did stop working. Maybe Markdown Preview Enhanced does not like "empty strings" anymore.
Maybe you have the same issue?
Describe the bug I tried to export pdf though Puppeteer after I set the correct Chorme path. But there is no reaction.
Environment
To Reproduce Steps to reproduce the behavior:
Expected behavior PDF exported successfully