Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Aug 28, 2020 12:41 pm

Hi,

How to moq and write unit test cases for following code

MemoryStream stream = new MemoryStream()
HtmlConverter.Convert(url, stream,
//enable javascripts
true,
//load timeout
100 * 1000,
//page size
new SizeF(612, 792),
//page margins
new Spire.Pdf.Graphics.PdfMargins(0, 90, 0, 40));

santoshballa
 
Posts: 6
Joined: Wed Aug 05, 2020 12:59 pm

Mon Aug 31, 2020 7:54 am

Hi,

Thanks for your inquiry.
We are sorry that we do not understand the test method you mentioned, and can't help you in this regard. In addition, we suggest you specify the Plugin Path directly. Here is the sample code. If there is any problem during the test, please feel free to contact us.
Code: Select all
Spire.Pdf.HtmlConverter.Qt.HtmlConverter.PluginPath = @"..\bin\ plugins";


Sincerely,
Lynn
E-iceblue support team
User avatar

lynn.zhang
 
Posts: 57
Joined: Mon Jul 27, 2020 2:27 am

Return to Spire.PDF