Can I use Syncfusion as VB script (not VBScript.net) to convert html to pdf?

Hi, I am new to SyncFusion. Can I use Syncfusion as VB script (not VBScript.net) to convert html to pdf?

Thanks,

3 Replies

GK Gowthamraj Kumar Syncfusion Team September 22, 2020 10:45 AM UTC

Hi Yong, 

Thank you for using Syncfusion products. 

We can perform the HTML to PDF conversion with VB scripts in IE rendering engine. VBScript is supported only by Microsoft's Internet Explorer while other browsers (Safari and Chrome) support just JavaScript. IE rendering engine internally make use of Microsoft’s MSHTML (IE rendering engine) to convert HTML to vector images. From the images, we will render the PDF document. It will be generated as bitmap image (PDF text could not be selected) and it is the behavior of IE rendering engine. Please try the below sample in your end and let us know if it is suites your requirement. 


Please refer the below links for more information, 

Note: The MSHTML.dll (IE rendering engine) can run only in STA mode. So, please refer below KB link to run the converter in STA mode.  

Limitation with IE:  
However, if the input HTML contains HTML-5 or CSS3, IE(MSHTML) will only generate bitmapped output (PDF text could not be selected) and it is the behavior of IE. If IE generates bitmap image, then the tag for the image will be added to the document and not for the contents in the image. Please find the below UG link for more details,  

Please let us know if you need any further assistance with this. 

Regards, 
Gowthamraj K 



PN Preethi Nesakkan Gnanadurai Syncfusion Team September 23, 2020 04:03 AM UTC

From: Yong Su
Sent: Tuesday, September 22, 2020 2:37 PM
To: Syncfusion Support <[email protected]>
Subject: RE: Syncfusion support community forum 158039, Can I use Syncfusion as VB script (not VBScript.net) to convert html to pdf?, has been updated. 

Hi, 
 
Thank your response. Actually I probably didn’t describe my question clearly. We need SyncFusion PDF engine written in ASP code, not ASP.net code. For example, our currently PDF engine is ABCPDF, we called them using the following ASP format: 
 
Set oPDF  = CreateObject("ABCpdf6.Doc") 
oPDF.Page = oPDF.AddPage() 
oID = oPDF.AddImageHtml(sHTML) 
...... 
oPDF.Save sFileName 
 
We are currently review different products to replace “ABCPDF”, but we haven’t gotten to ASP.Net yet, only ASP. Can syncFusion engine be called by ASP, if so, do you have document and sample codes like “Set oPDF = CreateObject(“SyncFusion.Doc”) etc.? 
 
Thanks, 
 
Yong Su


GK Gowthamraj Kumar Syncfusion Team September 23, 2020 12:07 PM UTC

Hi Yong, 

Thank you for your update. 
 
Syncfusion HTML to PDF converter is a .NET library for converting web pages, SVG, MHTML and HTML files to PDF using C#. It uses popular rendering engines such as Internet Explorer (IE), WebKit, and Blink (Google Chrome). It is reliable and accurate. The result preserves all graphics, images, texts, fonts, and the layout of the original HTML document or webpage.  

Kindly please provide more details about your requirement (ASP code files, complete sample, you are mentioned the ASP code in your input html file or somewhat) to check in our end. So, that it will be helpful for us to analyze and assist you further on this. 

Regards, 
Gowthamraj K 


Loader.
Up arrow icon