Print HTML file (or URL) to PDF file and put a header text on every PDF page, Website to PDF Conversion with dynamic text contents on page header and page footer areas

I have the need to put a header on every page of a PDF that I am creating from an HTML file. I was hoping to use the tag as Internet Explorer uses.

Used your -default-header tag but got a "Result is failed. No output" error message. Am I missing something?

Also, in your readme.txt file, there is a -custom-header.

Can you tell me what names and values are allowed?

Thanks for your help.
Did some more searching on your knowledge base and found this:

I didn't know -hfflag, -header and -footer were available since it's not in your documentation (or I couldn't find it).

Put this in but still getting the same error message. Help!

Here is my command line:

html2any -hfflag on -header "&w" "" "C:\mypdf.pdf"

If I remove the -hfflag and -header, it works fine. I also tried -default-header and that doesn't seem to work as well.

Thanks for your time.

No, your command line is wrong, please run following command line to try again,

html2any -hfflag on -header "&w" -printtopdf "D:\temp\mypdf.pdf" ""


html2any -hfflag on -footer "&w" -printtopdf "D:\temp\mypdf.pdf" ""

If you want print HTML file to PDF file, you need use "-printtopdf" option to specify the output PDF filename, please notice this matter.


VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!