Hi All
I have one File That is in .HTML Extension and I want to convert that file into PDF File. But I don’t Want open the file and click on save as PDF. Instead of doing that I want to convert it in background with invoke activity or any other activity. I also find one VB.net Code for that and try to put in invoke activity but still phasing some issue.
The code I have Used is :
'Initialize HTML to PDF converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
Dim settings As New WebKitConverterSettings()
'Set WebKit path
settings.WebKitPath = “/QtBinaries/”
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = settings
'Convert HTML to PDF
Dim document As PdfDocument = htmlConverter.Convert(“http://www.google.com/”)
'Save the PDF document
document.Save(“HTMLToPDF.pdf”)
'Close the document
document.Close(True)
'This will open the PDF file so, the result will be seen in default PDF viewer
Process.Start(“HTMLToPDF.pdf”)
Can you Please help guys
Thanks in advance