Puppeteer - How can I get the current page (application/pdf) as a buffer or file?
问题 Using Puppeteer (https://github.com/GoogleChrome/puppeteer), I have a page that's a application/pdf . With headless: false , the page is loaded though the Chromium PDF viewer, but I want to use headless. How can I download the original .pdf file or use as a blob with another library, such as (pdf-parse https://www.npmjs.com/package/pdf-parse)? 回答1: Since Puppeteer does not currently support navigation to a PDF document in headless mode via page.goto() due to the upstream issue, you can use