Attached zip contains the source code.RTFCode.zip (15.0 KB)
We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJAVA-2138. You will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.
Using below code with 19.7 version converts RTF document of size 5KB in 5 seconds. We have the performance issues with more time taken by conversion.
Document document = new Document(“test.rtf”);
How the performance of RTF conversion to PDF can be improved with 19.7 version?
Please use SaveOptions.MemoryOptimization property as shown below. Hope this helps you.
Document doc = new Document(MyDir + "input.rtf"); SaveOptions saveOptions = SaveOptions.createSaveOptions(SaveFormat.PDF); saveOptions.setMemoryOptimization(true); doc.save(MyDir + "output.pdf", saveOptions);
saveOptions.setMemoryOptimization(true) doesn’t help in improving the conversion time.
We will inform you via this forum thread once this issue is resolved. We apologize for your inconvenience.