Hello,
I am creating tables with R and save the output as RTF files. Is there a server-mode/CLI/headless to convert RTF files to PDF with OpenOffice?
Note: I also considered using libreoffice, however reading my RTF files with Libreoffice has several issues (wrong font, mismatches in the table), and therefore I would rather like to use OpenOffice (where the output looks correct). As I have to do this for many files once a day, I am looking for a solution that I can automate on a Linux server.
Thank you for your help!
PS: Hope I added this to the correct forum ...
[Solved] Convert RTF from R to PDF via command line
[Solved] Convert RTF from R to PDF via command line
Last edited by MrProgrammer on Wed Feb 28, 2024 7:08 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Apache OpenOffice 4.1.13
Manjaro Linux
Manjaro Linux
- MrProgrammer
- Moderator
- Posts: 5095
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Convert RTF to PDF via command line
Your problem disappears if you can avoid RTF from R and create the PDF directly:
Export all the content of R script into PDF
Cookbook for R » Graphs » Output to a file
14.1 Outputting to PDF Vector Files
How to Save Multiple Plots to PDF in R
Export R output to a file
Earlier discussion in our forum:
Silently convert RTF to PDF
QR code conversion failure from RTF to PDF
Converting .rtf file to .pdf fails
RTF to PDF conversion fails
RTF to PDF with OO in server mode
Convert rtf to pdf
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: Convert RTF to PDF via command line
.rtf files are pretty rubbish - see [Tutorial] Differences between Microsoft and AOO/LO files for a discussion. Save as .odt is best.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.