Question:I want to generate PDF by passing HTML contents to a function. I have made use of ItextSharp for this but it does not perform well when it encounters Table and the layout just gets messy.Is there any software available on VeryPDF?
Step 1 . Register for an API key
- This is software is not freeware but it is quite cheap as it charges per Month. Say if your projects will last one month, you can simply buy one month of this software. It only charges $19.95 / Month. By this method, you do not need to buy some expensive SDK software for whole life using.
- Before using this software, please register an account then an API code will be sent to your email box at once.
Step 2. Convert HTML to PDF by Web page to PDF Converter Cloud API
- When converting HTML to PDF, please use this online link.
Please pay more attention to the structure of this link. First, please add API code= at this part, then specify which software you use like html2pdf, at last please specify the website link you need to convert and output PDF file.
- By this software, you can specify many options like specify output PDF paper size, output grayscale PDF file or insert header or footer to output PDF.
- Now let us check more examples of editing this link for different output.
Convert web page to PDF file with A3 paper,
Convert web page to PDF file and insert header and footer text contents,
Now let us check how to call this software from VB.NET to convert HTML to PDF.
Imports System.IO Imports System.Net Module Module1 Sub Main() 'Address of URL Dim URL As String = "http://online.verypdf.com/api/?apikey=XXXX-XXXX-XXXX-XXXX&app=html2image&infile=https://www.verypdf.com&outfile=verypdf.jpg" ' Get HTML data Dim client As WebClient = New WebClient() Dim data As Stream = client.OpenRead(URL) Dim reader As StreamReader = New StreamReader(data) Dim str As String = "" str = reader.ReadLine() Do While str <> Nothing Console.WriteLine(str) str = reader.ReadLine() Loop End Sub End Module
During the using, if you have any question, please contact us as soon as possible.