2

I am using below code to add a company logo in r markdown in a pdf version and
the output is fine.
I need to add 2 logo's on each page - one for my client and other for our
company. Is is possible to add 2 logo's in a pdf using r markdown.

    ---
title: "Complaints Text Model"
author: "ANALYTICS TEAM"
date: '`r format(Sys.Date(), "%B %d, %Y")`'
output:
  pdf_document:
    toc: yes 
header-includes:
    - \usepackage{fancyhdr}
always_allow_html: yes
---
\addtolength{\headheight}{1.0cm} 
\pagestyle{fancyplain} 
\rhead{\includegraphics[height=1.2cm]{D:/D Drive Data/Shivi/R Project/my company.png}} 
\renewcommand{\headrulewidth}{0pt} 

One can be on one side of the page and other logo on the other side.

alistaire
  • 42,459
  • 4
  • 77
  • 117
Shivi Bhatia
  • 157
  • 4
  • 22
  • Possible duplicate of [Insert a logo in upper right corner of R markdown pdf document](https://stackoverflow.com/questions/27982052/insert-a-logo-in-upper-right-corner-of-r-markdown-pdf-document) – patL Jun 05 '18 at 16:12

1 Answers1

3

All you need to do is imitate your syntax for the left header:

\rhead{\includegraphics[height=1.2cm]{D:/D Drive Data/Shivi/R Project/my company.png}}
\lhead{\includegraphics[height=1.2cm]{D:/D Drive Data/Shivi/R Project/client.png}}
David Klotz
  • 2,401
  • 1
  • 7
  • 16