Large txt conversion and ProgressMonitor in Java

Product: PDFNet

Product Version:9.1.0

Please give a brief summary of your issue:
Converting 1GB .txt files was getting error

Please describe your issue and provide steps to reproduce it:
Using PDFNet.toPDF() method to convert a txt file that more than 1GB will get error “Word cannot open this file because it is larger than 512 Megabytes”

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Hello, based on the error, it appears that Microsoft Word is being used to convert the text file to PDF. Instead of toPDF() method, can you please try the Convert.fromText() method as described by this sample instead?

Please let me know if this work for you.

2 Likes

Hi @shakthi124,

Thanks for the suggestion, it’s working fine now. May I know is there any samples that i can refer to properly monitor the conversion progress?

1 Like

You may use the StreamingPDFConversion API to monitor progress. Please see the post below for more information:

2 Likes