skip to Main Content

I am converting three html files(body html template, header html template, footer html template) to pdf via using wkhtmltopdf. But this error is coming "Unknown long argument –header-htmlá" this error comes after I updated the pc before that everything was fine.

I have tried multiple versions of wkhtmltopdf software, but not able to overcome from this error.

2

Answers


  1. The error message suggests that the command-line argument "–header-html" is not recognized by wkhtmltopdf. This could be due to a compatibility issue between the version of wkhtmltopdf you are using and the updated version of your PC’s operating system or some other software.

    Here are some things you can try to troubleshoot the issue:

    Check the version of wkhtmltopdf you are using and make sure it is compatible with your operating system. You can find a list of supported platforms on the wkhtmltopdf website.

    Double-check that you are using the correct syntax for the command-line argument. It should be "–header-html" (without the "á" character).

    Try using a different command-line tool to convert the HTML files to PDF, such as PhantomJS or PrinceXML.

    If none of the above solutions work, you can try downgrading your PC’s operating system to a version that was compatible with the previous version of wkhtmltopdf.

    You can also consider reaching out to the support team of wkhtmltopdf or the community forums for assistance with troubleshooting the issue. They may be able to provide more specific guidance based on your particular situation.

    Login or Signup to reply.
  2. --header-html
    

    Th above is a valid argument for wkhtmltopdf but it thinks you have entered this:

    --header-htmlà
    

    without additional info its hard to know why this is happening but I suspect you are copy pasting the command.

    Try typing it out in full rather than copy pasting, the source application or terminal you are using may not correctly display or understand extended character sets leading to unexpected behaviour.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search