1 year ago
#377234
Denis D.
Corrupted .rtf file with embeded fonts
I’m working on a program written in Java that uses LibreOffice to convert documents to .pdf format. Clients on their side use Microsoft Word.
The functionality of the program is such that through the program interface, clients upload documents to their server. It turns out that at first, the program reads the format and content of the document, then saves the content in .pdf and saves this document on the server.
I ran into a problem when working with a .rtf document that has the embed fonts option enabled. The problem is that when working with a document in Microsoft Word, everything works well. But if this document is opened in LibreOffice Writer (it doesn’t matter the version, I tried from 6.0.0.1 to 7.3.1), then the document is damaged, even if these are done manually, for example, on the Desktop in Windows. That is, the table inside the document is not displayed correctly. If I open it again in Microsoft Word, the document remains “damaged”. But if BEFORE these manipulations in Microsoft Word turn off the embed fonts option and then open it in LibreOffice or upload it to the server through my program, then everything will work fine. This error occurs both when working through the code and if this is done manually.
I think that the problem is related to this topic for the .doc and .docx format, but here I solved everything by switching from Windows Server 2016 to Windows Server 2019, but even on Windows Server 2019, the problem with .rtf remains. The same problem exists in Windows 10.
Can you tell me how to fix the problem so that the embed fonts function remains active? Because I can’t tell clients not to use embed fonts.
Thanks!
P.S. Sorry, I can’t provide the actual file. It contains very important customer information. When editing or replacing text and after saving, the file is also saved damaged for the Word program. Therefore, I will leave a link to the image of the “normal” file and the damaged one, to make it clear what “corrupted” is.
java
rtf
libreoffice
embedded-fonts
libreoffice-writer
0 Answers
Your Answer