error with rapport.pdf and Logo=TRUE on Windows
danreb25 opened this issue · 4 comments
when R is installed under "Program Files" the logo URL generated in the *.md file prevent the file from being converted to pdf ( it is ok with html, and docx i.e. in these files the logo isn't shown, but no error or warning is generated)
Here is the code example:
rp<-rapport(file.path(MY_TEMPLATE_DIR,"t-test.tpl"), ius2008, x = "leisure", pi.value=TRUE)
f<-file.path (MY_RAPPORT_PROJECT_DIR,'demo')
tpl.export( rp, file=f, format='pdf', logo=TRUE) ==> ERROR
Resolved with:
tpl.export( rp, file=f, format='pdf', logo=FALSE)
The console generated warning is:
Warning message:
In Pandoc.convert(fp, format = .self$format, open = open, proc.time = as.numeric(proc.time() - :
Pandoc had some problems while converting to pdf:
and there is no generated pdf file, just a *.md file with "![](C:/Program Files/R/R-3.0.0/library/rapport/includes/images/logo.png)" as logo URL
it works OK when URL is changed to "" and the following command is run under shell command line
pandoc demo.md -o demo.pdf
Thanks for reporting this issue. This is related to LaTeX img tags and paths including spaces.
Will definitely fix this problem (with a few others) in the next release of rapport
, probably in 1-2 weeks after merging #93
thanks for your reactivity,
By the way, regarding the above mentioned R console message "Warning message pandoc.convert ...." which isn't explicit!
Is there a way to print in the R console the far more explicit message that was generated when executiong the DOS cmd
pandoc demo.md -o demo.pdf
Indeed under the Dos Cmd window, the error message was clear about the not found logo filePath!
I should probably open another issues for this, under the feature Tag? tell me if you agree on that, and I'll open it.
Cheers
Sure, great idea, thanks for the hint about showing the pandoc
cmd!
ok new issue opened regarding the more explicit error message # 97