2

I'm searching and trying to add a image as watermark to rmarkdown pdf, I'm using the render function to generate the PDFs, and saw the \usepackage{draftwatermark} and this question:

Watermark in rmarkdown

But they don't help me in adding a image as watermark.

--EDIT--

I achieved what I wanted putting this to the header of .Rmd:

header-includes: - \usepackage{eso-pic,graphicx,transparent}

And placing this in the start of file (before the rest of .Rmd):

\AddToShipoutPictureFG{
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\centering  
  {\transparent{0.3} \includegraphics[width=\paperwidth,height=\paperheight,%
keepaspectratio]{background.png}}%
    }
  }
}

But the problem is that I can't choose the image that I want. It keeps getting a sample image from C:\Program Files (x86)\MiKTeX 2.9\tex\plain\present.

How I choose the folder before starting processing the file?

Community
  • 1
  • 1
  • The problem was solved in another question, if anyone fall here because of search, go to http://stackoverflow.com/questions/39833768/how-to-get-images-from-the-tex-folder-relative-path-in-rmarkdown/39835946#39835946 – Luiz Fernando Moratelli Oct 06 '16 at 12:25

0 Answers0