You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code which outputs page.pdf into variable
#!/usr/bin/env -S deno -q run -A --unstable
import puppeteer from "https://deno.land/x/puppeteer/mod.ts";
const browser = await puppeteer.launch()
const page = await browser.newPage();
const html = "<html></html>";
await page.goto("data:text/html," + html, {
waitUntil: 'networkidle2'
});
const pdf = await page.pdf({
format: 'A4',
})
await browser.close()
fails in Deno Puppeteer versions 16.2.0 and 14.1.1, but works in the version 9.0.2. The error is as follows
error: Uncaught TypeError: reader is not async iterable
for await (const chunk of reader) {
^
at getReadableStreamAsUint8Array (https://deno.land/x/[email protected]/vendor/puppeteer-core/puppeteer/common/util.js:329:29)
at Page.pdf (https://deno.land/x/[email protected]/vendor/puppeteer-core/puppeteer/common/Page.js:2606:24)
at async file:///home/dir/test.ts:12:13
This error is also absent in newer versions of Puppeteer, f.e. 19.x.x.
The text was updated successfully, but these errors were encountered:
The following code which outputs
page.pdf
into variablefails in Deno Puppeteer versions 16.2.0 and 14.1.1, but works in the version 9.0.2. The error is as follows
This error is also absent in newer versions of Puppeteer, f.e. 19.x.x.
The text was updated successfully, but these errors were encountered: