Giter Site home page Giter Site logo

Comments (2)

westy92 avatar westy92 commented on May 25, 2024

Is this still an issue?
If so, could you please share:

  • html-pdf-chrome version
  • Linux distro and version
  • pm2 version
  • Node.js version
  • Chrome version

from html-pdf-chrome.

hydra1983 avatar hydra1983 commented on May 25, 2024

I have set a specific IP address for the host, but it defaults to 127.0.0.1 To resolve this issue:

  • Set the useHostName to true.

After upgrading Chrome to version 114, I encountered an error: Using unsafe HTTP verb GET to invoke /json/new. This action supports only the PUT verb.. To rectify this:

  • Use chrome-remote-interface@^0.32.0
  • Ensure the resolutions are properly configured in your package.json.
const options: CreateOptions & {
  useHostName: boolean
} = {
  host,
  port,
  printOptions: {
    ...request,
  },
  useHostName: true
};
console.log(
  `Generate pdf through html-pdf-chrome with options ${JSON.stringify(
    options,
    null,
    2
  )}`
);
const pdf = await htmlPdf.create(html, options);
return pdf.toBuffer();
"resolutions": {
  "chrome-remote-interface": "^0.32.0"
},

Fixing Chrome DevTools warning "Using unsafe HTTP verb" and
Export of Jaspersoft Graphical Reports fails post upgrade of Google Chrome

hope this can help you

  • Node: v16.19.1
  • html-pdf-chrome: ^0.8.4
  • chrome-headless: 114.0.5735.106

from html-pdf-chrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.