In order to use PDF Duo .Net in your application, you must first add a reference to it:
1.
In Solution Explorer (VisualStudio .Net) , expand the project node you want to add a reference to.
2.
Right-click the References node for the project and select Add Reference... from the shortcut menu:

3.
Locate the component using the Browse button.
4.
The component you referenced appears in the File Name field of the dialog box:

5. Click OK when you have added reference to the component.
1private void Form1_Load(object sender, EventArgs e) 2{ 3 // TODO: If using PDFduo Full Version, put your License Code below. 4 // Otherwise, if you are using PDFduo Trial, comment out the 5 // following line (Free version doesn't have LicenseCode method). 6 // DuoDimension.HtmlToPdf.SetLicenseCode("YOUR-LICENSE-CODE-HERE"); 7 8 string file_html = @"K:\hdoc.html"; 9 string file_pdf = @"K:\new.pdf"; 10 11 try 12 { 13 DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf(); 14 conv.OpenHTML(new FileInfo(file_html)); 15 conv.SavePDF(new FileInfo(file_pdf)); 16 } 17 catch (Exception ex) 18 { 19 MessageBox.Show(ex.Message); 20 } 21}
1Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 2 ' TODO: If using PDF Duo.Net Full Version, put your License Code below. 3 ' Otherwise, if you are using PDF Duo.Net Trial, comment out the 4 ' following line (Free version doesn't have LicenseCode method). 5 ' DuoDimension.HtmlToPdf.SetLicenseCode("YOUR-LICENSE-CODE-HERE") 6 7 8 Dim file_html As String = "K:\hdoc.html" 9 Dim file_pdf As String = "K:\new.pdf" 10 11 Try 12 Dim conv As New DuoDimension.HtmlToPdf() 13 conv.OpenHTML(new FileInfo(file_html)); 14 conv.SavePDF(new FileInfo(file_pdf)); 15 Catch ex As Exception 16 MessageBox.Show(ex.Message) 17 End Try 18End Sub