How to convert HTML to PDF and add header and footer without system requirement?

Question: I have a requirement to convert a PDF from HTML. My input HTML page has a tabular structure and it has separate header and footer. I've converted this page to PDF , however as my HTML page has a footer associated with it, I'm trying to relocate footer of my generated PDF to location where actual data of a particular page ends(i.e if a page contains only 10 lines of data from header then I'm trying to add footer after 10th line). Someone helped me to add header and footer,but I'm getting struck with this relocation requirement. Can anybody tell me how to deal with such scenarios? Is there a solution on VeryPDF?

Answer: When converting HTML to PDF without header and footer problem confused, maybe you can have a free trial of VeryPDF desktop version HTML Converter Command Line. But this is Windows version, if you need to run the conversion without system requirement, please use VeryPDF cloud based API named Web Page to PDF Converter Cloud API, which also can help you convert HTML to PDF and deal with header and footer problem. As it is cloud based application, it can work under any computer system like Windows, Mac, Linux and others. It also have special parameters to handle with header and footer problem. Please check more information of this software on homepage, in the following part, I will show you how it works.

Step 1. Convert HTML to PDF and add footer and header.

  • When using VeryPDF cloud based application, all you need to do is that open a browser and then input URL following examples in user manual. There is no third party application needed.
  • Here is a URL example for your reference:
    http://online.verypdf.com/api/apikey=XXXXXXXXXXXXX&app=html2pdf&infile=
    https://www.verypdf.com&outfile=verypdf.pdf&--header-left=
    https://www.verypdf.com&--header-right=
    Page%20[page]/[toPage]&--margin-top=2cm&--header-line&--footer-left=
    Date:%20[date]%20%20%20%20Time:%20[time]
    By this above command line, we can convert HTML to PDF and insert header and footer text contents. Now let us check related parameters that you may need:
  • -footer-center*     <text>     Centered footer text
          --footer-font-name*     <name>     Set footer font name (default Arial)
          --footer-font-size*     <size>     Set footer font size (default 11)
          --footer-html*     <url>     Adds a html footer
          --footer-left*     <text>     Left aligned footer text
          --footer-line*           Display line above the footer
          --footer-right*     <text>     Right aligned footer text
          --footer-spacing*     <real>     Spacing between footer and content in mm (default 0)
          --header-center*     <text>     Centered header text
          --header-font-name*     <name>     Set header font name (default Arial)
          --header-font-size*     <size>     Set header font size (default 11)
          --header-html*     <url>     Adds a html header
          --header-left*     <text>     Left aligned header text
          --header-line*           Display line below the header
          --header-right*     <text>     Right aligned header text
          --header-spacing*     <real>     Spacing between header and content in mm (default 0)

  • I guess by those parameters and functions, you can solve problem of relocating footer of generated PDF to location where actual data of a particular page ends. Actually you can add brand new header and footer detail information even if you can not relocate them.

Step 2. Get an API code.

  • Please note all VeryPDF cloud based APIs are not totally free. If you do not have API code, there will be watermark on output.
  • When you need to get the API code, please register an account on registration page and then choose buy API mode. After paying the API code will be sent to your email box at once.
  • By the API code, you can use all the VeryPDF API software free.

By this API, you can convert HTML to PDF and add footer & header information without computer system limitation. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 8.5/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
How to convert HTML to PDF and add header and footer without system requirement?, 8.5 out of 10 based on 2 ratings

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!