Converter hangs on big txt file

Hello,

I have issue when converting big text file to PDF.

I have prepared the file with commands:

echo "This is just a sample line appended to create a big file. " > dummy.txt
for /L %i in (1,1,21) do type dummy.txt >> dummy.txt

Then I ran a code:

var lines = ReadAllLines(); //Read 2097153 lines “This is just a sample line appended to create a big file.”

var pdf = new Document { PageInfo = { Margin = new MarginInfo (25,25,25,25) } };
var section = pdf.Pages.Add();
section.AddLinesToSections(lines);

using (var outputStream = new MemoryStream())
{
pdf.Convert(outputStream, PdfHelper.CONST_Text_RenderFormat, ConvertErrorAction.Delete); //Takes hours, actually I stopped to wait till the end…
}

I am using Assembly: Aspose.PDF, Version=21.3.0.0, Culture=neutral, PublicKeyToken=f0262d67fe233d63

Please, propose a solution to this issue.

Thanks,
Severin

@gomezw

Can you please share sample application with custom methods definitions so that we can reproduce it on our end.

AsposeTest.zip (7.4 KB)

Please find example solution attached

Please generate input data file using commands:

echo "This is just a sample line appended to create a big file. " > dummy.txt
for /L %i in (1,1,21) do type dummy.txt >> dummy.txt

Then run the application using AsposeText.exe dummy.txt

@gomezw

I can not reproduce the issue so I would suggest to upgrade to latest version and share your txt file if issue persists.

Please share the output of the test program I have provided. I need to know the time dummy.txt was processed in on your side.

Please use this dummy.txt: dummy.zip (601.0 KB)

For me it is running already two hours without result:

image.png (12.0 KB)

and this is an issue…

@gomezw

Thank you for sharing your input file. We had tested it with a txt file containing 100000 lines of text which were processed in few minutes. However, your input file reproduces the issue. A ticket with ID PDFNET-49935 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thank you. Do you have any ETA for delivery of a fix for this issue?

@gomezw

The issue has just recently been added in our issue tracking system and is pending for investigation and resolution. I request for your patience and we will share the good news with you as soon as it will be addressed w.r.t Free support priority.