The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Here is my problem. When I try to create a new WordDocument, an exception "System.ArgumentOutOfRangeException : Non-negative number required" occurs.
Here is my code :
Public Function ConvertDocToPDF(ByVal v_strDocFileName As String, ByVal v_strPassword As String, ByVal v_strPDFFileName As String) As Boolean Dim blnReturn As Boolean = False Dim objConverter As DocToPDFConverter = Nothing Dim objWordDocument As WordDocument = Nothing Dim objPDFDocument As Pdf.PdfDocument = Nothing
Try objWordDocument = New WordDocument(v_strDocFileName, v_strPassword) objConverter = New DocToPDFConverter objPDFDocument = objConverter.ConvertToPDF(objWordDocument) objPDFDocument.Save(v_strPDFFileName) blnReturn = True Catch ex As Exception System.Windows.Forms.MessageBox.Show(ex.ToString) Throw ex Finally If Not IsNothing(objWordDocument) Then objWordDocument.Close() If Not IsNothing(objPDFDocument) Then objPDFDocument.Close() If Not IsNothing(objConverter) Then objConverter.Dispose() End Try
BPBhuvaneswari P Syncfusion Team June 20, 2009 05:52 AM UTC
Hi Carl.
Thank you for your interest in Syncfusion products.
Could you please provide your word document in which you want to convert to PDF document? This would be very helpful for us to reproduce and investigate the issue further.
Best Regards, Bhuvana
MAMitch AriasDecember 19, 2009 04:38 PM UTC
Carl,
Could you please tell me what assemblies you are using in order to get to the DocToPDFConverter class? I cannot find it anywhere.