We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





82670 Jun 18,2009 02:30 PM UTC Dec 19,2009 04:38 PM UTC WinForms 2
Tags: DocIO
Carl Davidson
Asked On June 18, 2009 02:30 PM UTC

Hi everyone,

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

objWordDocument = New WordDocument(v_strDocFileName, v_strPassword)
objConverter = New DocToPDFConverter
objPDFDocument = objConverter.ConvertToPDF(objWordDocument)
blnReturn = True
Catch ex As Exception
Throw ex
If Not IsNothing(objWordDocument) Then objWordDocument.Close()
If Not IsNothing(objPDFDocument) Then objPDFDocument.Close()
If Not IsNothing(objConverter) Then objConverter.Dispose()
End Try

Return blnReturn
End Function

Can anybody help me...

Thanks in advance

Carl Davidson

Bhuvaneswari P [Syncfusion]
Replied On 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,

Mitch Arias
Replied On December 19, 2009 04:38 PM UTC


Could you please tell me what assemblies you are using in order to get to the DocToPDFConverter class? I cannot find it anywhere.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon