Application hangs on page.Accept(textFragmentObsorber)


#1

Dear Aspose PDF team.
We bought license for our product and meet problem.

We are Creating PDF document via Aspose.PDF and put text inside created document.
Then we want to replace everything with some text. But when we want to get all text from document .application hangs on doc.Pages.Accept(textFragmentAbsorber);
I tried to evaluate in watcher and it throws Evaluation timed out.
Could you help me ?
Note: Aspose.PDF version 10.9.0.0

Evaluation timed out.PNG (3.4 KB)

Document doc = new Document(file);

        Aspose.Pdf.Text.TextOptions.TextSearchOptions textSearchOptions = new Aspose.Pdf.Text.TextOptions.TextSearchOptions(true);
        TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber(".*", textSearchOptions);

        doc.Pages.Accept(textFragmentAbsorber);

#2

@Grig95

Thanks for contacting support.

I am afraid that you are using quite old version of the API and many improvements have been made to the API since then. It is always and strongly recommended to use latest version as it has new features and enhancements as well as improvements in terms of memory consumption. Would you please try your scenario with Aspose.PDF for .NET 18.11 and in case you still face any issue, please feel free to let us know by sharing your sample PDF document.


#3

Hi @asad.ali,
Thanks for quick response.
Yes I will try it.
Does all functions or types have keep in new version , because we are using so many from Aspose.Pdf ?

Thanks in advance


#4

@Grig95

Thanks for writing back.

In latest version of the API, old Aspose.Pdf.Generator approach has been deprecated. Latest API versions offer Aspose.Pdf (DOM) model which is more efficient and can be used to deal with document at object level. In order to work with DOM model, you please visit following documentation article(s).

In case of any further assistance, please feel free to let us know.


#5

Thanks a lot .I will look


#6

Hi @asad.ali

We meet another problem.
We have document with attachment but it does not appears in Embedded Files property
New Bitmap Image (3).jpg (453.7 KB)
PDFwithAttachments.pdf (19.3 KB)


#7

@Grig95

Thanks for getting back to us.

We were able to replicate the issue in our environment and logged it as PDFNET-45780 in our issue tracking system for the sake of detailed investigation. We will further look into details of the issue and keep you posted with the status of its correction.

However, we have noticed that the PDF file was created using older version of the API. Would you please try to create same file using latest version and in case you still face similar issue, please let us know.

We are sorry for the inconvenience.


#8

Hi @asad.ali

Thanks for quick response.
Yes we created PDF in old version (at 2017 or before) . The problem is we can have a lot of documents which were created in old version,so we need to extract info from those documents.

After of founding issue yesterday , I have tried to create document in old version and it worked.
I attached file to PDF document and successfully extracted attachments from it.

Regards
Grigor Vardanyan


#9

@Grig95

Thanks for sharing further details.

Did you mean that older version of the API is working correctly while extracting attachments?

We have recorded your concerns and will definitely consider them while investigating the logged issue. Please spare us little time.