Convert a text file with numbered items to PDF in Java

Product version: GroupDocs Conversion Java version 17.12
OS: Ubuntu 14.04.5

when converting a .txt to .pdf, if you happen to number items at the beginning of a line, and those numbers happen to be sequential, the converter converts it into a list by adding periods after the number.

for example, if your .txt file has:

1 of these things but
2 of these other things and
3 of the last things

it will be rendered as a pdf like so:

  1. of thse things but
  2. of these other things and
  3. of the last things

(see attached zip that has a .txt and a screenshot of the groupdocs rendered .pdf)

sequential_txt.zip (23.4 KB)

@bkirkby,

Thank you for your inquiry.
We successfully reproduced this issue. Hence, it has been logged in our internal issue tracking system with ID:CONVERSIONJAVA-528. As we have any further update on it, we shall notify you.

@bkirkby,

Your reported issue CONVERSIONJAVA-528 is now resolved in latest release of the API. Please download 18.12 and share your feedback.

1 Like

i think there might have been a regression here. i deployed groupdocs-conversion 19.4 on 5/31, and i now see that this problem is back. you can use the original file in the original report above to verify that it’s broken.

i also tested it with groupdocs-conversion 19.6.3.

thanks

1 Like

@bkirkby,

We’re sorry for the inconvenience you faced. We started investigation on this with ticket CONVERSIONJAVA-770. As there is any update, you’ll be notified.

1 Like

Hello @Atir_Tahir.

I am one of the team members responsible for the application @bkirkby was working before.

I can see that this issue still persists (I just tried with your Live Demo), and I wonder if it’s still on your bug list to fix since it’s been a very long time since this topic was created.

Thank you in advance!

1 Like

@murilopaiva

This issue is under investigation, you’ll be notified about the outcomes by day end.

@murilopaiva

Please use latest API version that is 21.7 and following code to get right output:

TxtLoadOptions txtOptions = new TxtLoadOptions(); 
txtOptions.setDetectNumberingWithWhitespaces(false);
Converter converter = new Converter("D://sequential_list.txt", txtOptions);
PdfConvertOptions options = new PdfConvertOptions();
converter.convert("D://output.pdf", options);

Hello @Atir_Tahir.

Thank you for your fast answer, I will try that!

Have a nice day!

1 Like

@Atir_Tahiri believe you can close this if you want to, thanks again!

1 Like