Function to convert document to pdf?

161 views
Skip to first unread message

Jelle Geertsma

unread,
Jun 20, 2015, 1:45:21 AM6/20/15
to reporter...@googlegroups.com
Hi David,

I use ReporteRs in an automated workflow, but at the end I need pdf docs as the output. Now I have to this by hand. Are there any plans about adding a function to your package that converts the documents in pdf ones?

Kind regards,
Jelle

Frans Marcelissen

unread,
Jun 21, 2015, 8:06:55 AM6/21/15
to reporter...@googlegroups.com
Hi,
In the workflow it is simple to use libreoffice for that:

docfile<-'boe.docx'
doc<-docx()
.
.
writeDoc( doc, file = docfile)
system(paste("libreoffice --headless --convert-to pdf  ", docfile), intern = TRUE)

now boe.pdf is created

Op zaterdag 20 juni 2015 07:45:21 UTC+2 schreef Jelle Geertsma:

David Gohel

unread,
Jun 22, 2015, 4:37:13 AM6/22/15
to reporter...@googlegroups.com, fransiepan...@gmail.com
Hi Frans,

Thanks for the tip!

David

Jelle Geertsma

unread,
Jul 1, 2015, 6:55:47 AM7/1/15
to reporter...@googlegroups.com, fransiepan...@gmail.com
Hi Frans,

This is indeed a very nice solution. Thanks!

@David, any future plans for integrating this into the package?

Kind regards,
Jelle

David Gohel

unread,
Jul 1, 2015, 2:04:08 PM7/1/15
to reporter...@googlegroups.com, jelle.g...@gmail.com, fransiepan...@gmail.com
OK 

As it does not take too much time, it could be a function in the next release.

David
Message has been deleted

Jelle Geertsma

unread,
Jul 1, 2015, 2:41:11 PM7/1/15
to reporter...@googlegroups.com
I am looking forward to it! I think it will make me an even bigger fan of ReporteRs than I already am :-)
Kind regards,
Jelle

John Vida

unread,
Jul 5, 2015, 6:31:38 PM7/5/15
to reporter...@googlegroups.com, fransiepan...@gmail.com, jelle.g...@gmail.com
Hi David, 

I use this technique explained here to convert docx to pdf. May be you can use it and create a function based on it. 


Sorry I am a novice, so I wouldn't know whether it would help you or not. 

John
Reply all
Reply to author
Forward
0 new messages