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

Free Support Forum - aspose.com

Unable to upload PDF: Index and length must refer to a location within the string. Parameter name: length

Hello,

We receive an error when attempting to upload a PDF.

content file: sample (716.8 KB)
error message: “Index and length must refer to a location within the string. Parameter name: length”
stack trace: “… page.Accept(textAbsorber)”
code: …

'create TextAbsorber object to extract text
Dim textAbsorber As New TextAbsorber(New TextExtractionOptions(TextExtractionOptions.TextFormattingMode.MemorySaving))

'open document
Using doc As New Aspose.Pdf.Document(inFile)
    'accept the absorber for each of the pages
    For Each page As Page In doc.Pages
        page.Accept(textAbsorber)
        page.Dispose()
    Next
    doc.Dispose()
End Using

Do you have any suggestions on how we can resolve this issue?

Thank you!

@kmanol

We were able to replicate the issue in our environment. Hence, it has been logged as PDFNET-51476 in our issue management system for the sake of correction. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

@asad.ali

Thank you for your response! We await your update on this issue.

@asad.ali

Our Product Management team would like to know if there are any updates for PDFNET-51476?

Thank you!

@kmanol

Regretfully, the ticket has not been yet reviewed. Please note that it was logged under free support model and it will be investigated and resolved on a first come first serve basis. We will surely inform you once we definite updates about its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.