We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error Saving PDF as Docx - OutOfRangeException

Good morning,


I get System.OutOfRangeException while saving a PDF as DOCX in Aspose.PDF version 10.6.0.0 and 10.7.0.0

with the following code snippet, the error appears:
Dim license = New Aspose.Pdf.License()
license.SetLicense(“Aspose.Total.lic”)

Using pdfDocument As New Document(sourceFilePath)
Dim dso As New DocSaveOptions()
dso.Mode = DocSaveOptions.RecognitionMode.Flow
dso.Format = DocSaveOptions.DocFormat.DocX
dso.RelativeHorizontalProximity = 2.5F
dso.RecognizeBullets = True
pdfDocument.Save(targetFilePath, dso)
End Using


with the following code snippet saving is successful (without license, with “Evalution Only” note in document):

’ Dim license = New Aspose.Pdf.License()
’ license.SetLicense(“Aspose.Total.lic”)

Using pdfDocument As New Document(sourceFilePath)
Dim dso As New DocSaveOptions()
dso.Mode = DocSaveOptions.RecognitionMode.Flow
dso.Format = DocSaveOptions.DocFormat.DocX
dso.RelativeHorizontalProximity = 2.5F
dso.RecognizeBullets = True
pdfDocument.Save(targetFilePath, dso)
End Using

and finally saving is also successfull with activated license AND RecognitionMode.TextBox

Dim license = New Aspose.Pdf.License()
license.SetLicense(“Aspose.Total.lic”)

Using pdfDocument As New Document(sourceFilePath)
Dim dso As New DocSaveOptions()
dso.Mode = DocSaveOptions.RecognitionMode.TextBox
dso.Format = DocSaveOptions.DocFormat.DocX
dso.RelativeHorizontalProximity = 2.5F
dso.RecognizeBullets = True
pdfDocument.Save(targetFilePath, dso)
End Using


Could you please help me? I would like to use RecognitionMode.Flow

Thanks in advance

Hi Christian,


Thanks
for using our API’s.
<o:p></o:p>

I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as
PDFNEWNET-39321 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.