Convert PDF to Text using Aspose.PDF for .NET - Numbers are reversed in output

hi.
when i try to change between PDF to Text i get numbers from right to left. and not left to right

i send you the code and file for example

Denis_Blau_VC.pdf (171.9 KB)

if lcase(fileType)="pdf" then
			
			  Dim docHtml As New Aspose.pdf.Document(f.InputStream)
              Dim textAbsorber As New TextAbsorber()
              docHtml.Pages.Accept(textAbsorber)
              Dim extractedText As String = textAbsorber.Text
              Response.Write(extractedText)
              
            else
			
			  Dim info As FileFormatInfo = FileFormatUtil.DetectFileFormat(f.InputStream)
              Dim lf As Aspose.words.LoadFormat = info.LoadFormat
              Dim options = New Aspose.words.LoadOptions(lf, "", "")
              Dim docWord As New Aspose.words.Document(f.InputStream, options)
              Dim docStream As New MemoryStream()
              Dim fileExtension As String = FileFormatUtil.LoadFormatToExtension(lf)
              Dim sf As Aspose.words.SaveFormat = FileFormatUtil.ExtensionToSaveFormat(fileExtension)
              sf = FileFormatUtil.LoadFormatToSaveFormat(lf)
              
              Dim opt
              opt = New Saving.OoxmlSaveOptions()
              
      				if sf.ToString() = "Doc" then 
      					opt = New Saving.DocSaveOptions(sf)
      				elseif sf.ToString() = "Docx" then
      					opt = New Saving.OoxmlSaveOptions(sf)
      				elseif sf.ToString() = "Rtf" then
      					opt = New Saving.RtfSaveOptions()
      				end if
      				docWord.Save(docStream, opt)

              Response.Write(wordReadFile(docWord))

thank you :slight_smile:

@eranlipi,

We have tested the scenario in our environment and were able to notice the issue. We have logged it as PDFNET-47753 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

1 Like