Adding a letterhead to an RMarkdown PDF

I'm trying to replicate a report using RMarkdown/LaTeX. Is it possible to add a letterhead to the top of a page in a similar way to the image I've attached? Hoping to find a solution where I can have a letterhead with a logo in it (and where I can easily customise the text and color of the letterhead too).

TIA

enter image description here

I'm using the standard article document class. Here is my YAML in RMarkdown

---
title: "Untitled"
author: "Name"
date: "4/8/2021"
output: pdf_document
---

EDIT - I've added my .log file below

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11) (preloaded format=pdflatex 2020.12.22)  10 APR 2021 20:36
entering extended mode
**./report.tex
(report.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-10-27> xparse <2020-03-03> ("C:\Program Files\MiKTeX
\tex/latex/base\article.cls"
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
("C:\Program Files\MiKTeX\tex/latex/base\size10.clo"
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\[email protected]=\count175
\[email protected]=\count176
\[email protected]=\count177
\[email protected]=\count178
\[email protected]=\count179
\[email protected]=\count180
\[email protected]=\count181
\[email protected]=\count182
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
) ("C:\Program Files\MiKTeX\tex/latex/lm\lmodern.sty"
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
) ("C:\Program Files\MiKTeX\tex/latex/amsmath\amsmath.sty"
Package: amsmath 2020/09/23 v2.17i AMS math features
\@mathmargin=\skip49
For additional information on amsmath, use the `?' option.
("C:\Program Files\MiKTeX\tex/latex/amsmath\amstext.sty"
Package: amstext 2000/06/29 v2.01 AMS text
("C:\Program Files\MiKTeX\tex/latex/amsmath\amsgen.sty"
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks15
\[email protected]=\dimen139
)) ("C:\Program Files\MiKTeX\tex/latex/amsmath\amsbsy.sty"
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\[email protected]=\dimen140
) ("C:\Program Files\MiKTeX\tex/latex/amsmath\amsopn.sty"
Package: amsopn 2016/03/08 v2.02 operator names
)
\[email protected]=\count183
LaTeX Info: Redefining \frac on input line 234.
\[email protected]=\count184
\[email protected]=\count185
LaTeX Info: Redefining \overline on input line 399.
\[email protected]=\count186
\[email protected]=\count187
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\[email protected]=\box47
\[email protected]=\box48
\[email protected]=\dimen141
LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
\[email protected]=\count188
\[email protected]=\count189
\[email protected]=\muskip16
\[email protected]=\count190
\[email protected]=\count191
\[email protected]=\toks16
\[email protected]=\count192
\[email protected]=\count193
\[email protected]=\count194
\[email protected]=\toks17
\[email protected]=\dimen142
\[email protected]=\dimen143
\[email protected]=\dimen144
\[email protected]=\dimen145
\[email protected]=\dimen146
\[email protected]=\dimen147
\@envbody=\toks18
\multlinegap=\skip50
\multlinetaggap=\skip51
\[email protected]=\toks19
LaTeX Info: Redefining \[ on input line 2923.
LaTeX Info: Redefining \] on input line 2924.
) ("C:\Program Files\MiKTeX\tex/generic/iftex\ifxetex.sty"
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.
("C:\Program Files\MiKTeX\tex/generic/iftex\iftex.sty"
Package: iftex 2020/03/06 v1.0d TeX engine tests
)) ("C:\Program Files\MiKTeX\tex/generic/iftex\ifluatex.sty"
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
) ("C:\Program Files\MiKTeX\tex/latex/base\fontenc.sty"
Package: fontenc 2020/08/10 v2.0s Standard LaTeX package
LaTeX Font Info:    Trying to load font information for T1+lmr on input line 11
2.
("C:\Program Files\MiKTeX\tex/latex/lm\t1lmr.fd"
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)) ("C:\Program Files\MiKTeX\tex/latex/base\inputenc.sty"
Package: inputenc 2020/08/01 v1.3d Input encoding file
\[email protected]=\toks20
\[email protected]=\toks21
) ("C:\Program Files\MiKTeX\tex/latex/base\textcomp.sty"
Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
) ("C:\Program Files\MiKTeX\tex/latex/amsfonts\amssymb.sty"
Package: amssymb 2013/01/14 v3.01 AMS font symbols
("C:\Program Files\MiKTeX\tex/latex/amsfonts\amsfonts.sty"
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)) ("C:\Program Files\MiKTeX\tex/latex/upquote\upquote.sty"
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
tim
) ("C:\Program Files\MiKTeX\tex/latex/microtype\microtype.sty"
Package: microtype 2019/11/18 v2.7d Micro-typographical refinements (RS)
("C:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\[email protected]@=\toks22
)
\[email protected]=\toks23
\[email protected]=\count195
LaTeX Info: Redefining \textls on input line 790.
\[email protected]@kern=\dimen148
LaTeX Info: Redefining \textmicrotypecontext on input line 1354.
\[email protected]@count=\count196
("C:\Program Files\MiKTeX\tex/latex/microtype\microtype-pdftex.def"
File: microtype-pdftex.def 2019/11/18 v2.7d Definitions specific to pdftex (RS)

LaTeX Info: Redefining \lsstyle on input line 914.
LaTeX Info: Redefining \lslig on input line 914.
\[email protected]@space=\skip52
)
Package microtype Info: Loading configuration file microtype.cfg.
("C:\Program Files\MiKTeX\tex/latex/microtype\microtype.cfg"
File: microtype.cfg 2019/11/18 v2.7d microtype main configuration file (RS)
)) ("C:\Program Files\MiKTeX\tex/latex/parskip\parskip.sty"
Package: parskip 2020-06-15 v2.0f non-zero parskip adjustments
("C:\Program Files\MiKTeX\tex/latex/kvoptions\kvoptions.sty"
Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)
("C:\Program Files\MiKTeX\tex/generic/ltxcmds\ltxcmds.sty"
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
) ("C:\Program Files\MiKTeX\tex/generic/kvsetkeys\kvsetkeys.sty"
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
)) ("C:\Program Files\MiKTeX\tex/latex/etoolbox\etoolbox.sty"
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\[email protected]=\count197
)) ("C:\Program Files\MiKTeX\tex/latex/xcolor\xcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("C:\Program Files\MiKTeX\tex/latex/graphics-cfg\color.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
("C:\Program Files\MiKTeX\tex/latex/graphics-def\pdftex.def"
File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
) ("C:\Program Files\MiKTeX\tex/latex/xurl\xurl.sty"
Package: xurl 2020/01/24 v 0.09 modify URL breaks
("C:\Program Files\MiKTeX\tex/latex/url\url.sty"
\Urlmuskip=\muskip17
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
)) ("C:\Program Files\MiKTeX\tex/latex/bookmark\bookmark.sty"
Package: bookmark 2020-11-06 v1.29 PDF bookmarks (HO)
("C:\Program Files\MiKTeX\tex/latex/hyperref\hyperref.sty"
Package: hyperref 2020-05-15 v7.00e Hypertext links for LaTeX
("C:\Program Files\MiKTeX\tex/generic/pdftexcmds\pdftexcmds.sty"
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
("C:\Program Files\MiKTeX\tex/generic/infwarerr\infwarerr.sty"
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \[email protected] is available.
Package pdftexcmds Info: \[email protected] is available.
Package pdftexcmds Info: \pdfdraftmode found.
) ("C:\Program Files\MiKTeX\tex/generic/kvdefinekeys\kvdefinekeys.sty"
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
) ("C:\Program Files\MiKTeX\tex/generic/pdfescape\pdfescape.sty"
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
) ("C:\Program Files\MiKTeX\tex/latex/hycolor\hycolor.sty"
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
) ("C:\Program Files\MiKTeX\tex/latex/letltxmacro\letltxmacro.sty"
Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
) ("C:\Program Files\MiKTeX\tex/latex/auxhook\auxhook.sty"
Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
)
\@linkdim=\dimen149
\[email protected]=\count198
\[email protected]=\count199
("C:\Program Files\MiKTeX\tex/latex/hyperref\pd1enc.def"
File: pd1enc.def 2020-05-15 v7.00e Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
) ("C:\Program Files\MiKTeX\tex/generic/intcalc\intcalc.sty"
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
) ("C:\Program Files\MiKTeX\tex/generic/etexcmds\etexcmds.sty"
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
)
\[email protected]=\count266
Package hyperref Info: Option `unicode' set `true' on input line 4338.
("C:\Program Files\MiKTeX\tex/latex/hyperref\puenc.def"
File: puenc.def 2020-05-15 v7.00e Hyperref: PDF Unicode definition (HO)
Now handling font encoding PU ...
... no UTF-8 mapping file for font encoding PU
)
Package hyperref Info: Hyper figures OFF on input line 4464.
Package hyperref Info: Link nesting OFF on input line 4469.
Package hyperref Info: Hyper index ON on input line 4472.
Package hyperref Info: Plain pages OFF on input line 4479.
Package hyperref Info: Backreferencing OFF on input line 4484.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4717.
\[email protected]@tempcnt=\count267
LaTeX Info: Redefining \url on input line 5076.
\XeTeXLinkMargin=\dimen150
("C:\Program Files\MiKTeX\tex/generic/bitset\bitset.sty"
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)
("C:\Program Files\MiKTeX\tex/generic/bigintcalc\bigintcalc.sty"
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
)
))
\[email protected]=\count268
\[email protected]=\dimen151
\[email protected]=\dimen152
Package hyperref Info: Hyper figures OFF on input line 6347.
Package hyperref Info: Link nesting OFF on input line 6352.
Package hyperref Info: Hyper index ON on input line 6355.
Package hyperref Info: backreferencing OFF on input line 6362.
Package hyperref Info: Link coloring OFF on input line 6367.
Package hyperref Info: Link coloring with OCG OFF on input line 6372.
Package hyperref Info: PDF/A mode OFF on input line 6377.
LaTeX Info: Redefining \ref on input line 6417.
LaTeX Info: Redefining \pageref on input line 6421.
("C:\Program Files\MiKTeX\tex/latex/base\atbegshi-ltx.sty"
Package: atbegshi-ltx 2020/08/17 v1.0a Emulation of the original atbegshi packa
ge
with kernel methods
)
\[email protected]=\count269
\[email protected]=\count270
\[email protected]=\count271
)
Package hyperref Info: Driver (autodetected): hpdftex.
("C:\Program Files\MiKTeX\tex/latex/hyperref\hpdftex.def"
File: hpdftex.def 2020-05-15 v7.00e Hyperref driver for pdfTeX
("C:\Program Files\MiKTeX\tex/latex/base\atveryend-ltx.sty"
Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atvery packag
e
with kernel methods
)
\[email protected]=\count272
\[email protected]@[email protected]=\count273
("C:\Program Files\MiKTeX\tex/latex/rerunfilecheck\rerunfilecheck.sty"
Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)
("C:\Program Files\MiKTeX\tex/generic/uniquecounter\uniquecounter.sty"
Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
86.
)
\[email protected]=\skip53
) ("C:\Program Files\MiKTeX\tex/latex/bookmark\bkm-pdftex.def"
File: bkm-pdftex.def 2020-11-06 v1.29 bookmark driver for pdfTeX (HO)
\[email protected]=\count274
)) ("C:\Program Files\MiKTeX\tex/latex/geometry\geometry.sty"
Package: geometry 2020/01/02 v5.9 Page Geometry
("C:\Program Files\MiKTeX\tex/generic/iftex\ifvtex.sty"
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
)
\[email protected]=\count275
\[email protected]=\count276
\[email protected]@tempcnt=\count277
\[email protected]=\dimen153
\[email protected]@mp=\dimen154
\[email protected]@mp=\dimen155
\[email protected]@mp=\dimen156
\[email protected]=\dimen157
\[email protected]=\dimen158
\[email protected]=\dimen159
\[email protected]=\dimen160
\[email protected]=\toks24
("C:\Program Files\MiKTeX\tex/latex/geometry\geometry.cfg")) ("C:\Program Files
\MiKTeX\tex/latex/graphics\graphicx.sty"
Package: graphicx 2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX\tex/latex/graphics\graphics.sty"
Package: graphics 2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX\tex/latex/graphics\trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) ("C:\Program Files\MiKTeX\tex/latex/graphics-cfg\graphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 105.
)
\[email protected]@height=\dimen161
\[email protected]@width=\dimen162
)
\@input{preamble.aux}
\openout2 = `preamble.aux'.

(preamble.tex ("C:\Program Files\MiKTeX\tex/latex/fancyhdr\fancyhdr.sty"
Package: fancyhdr 2019/01/31 v3.10 Extensive control of page headers and footer
s
\[email protected]@headwidth=\skip54
\[email protected]@[email protected]=\skip55
\[email protected]@[email protected]=\skip56
\[email protected]@[email protected]=\skip57
\[email protected]@[email protected]=\skip58
\[email protected]@[email protected]=\skip59
\[email protected]@[email protected]=\skip60
\[email protected]@[email protected]=\skip61
\[email protected]@[email protected]=\skip62
) ("C:\Program Files\MiKTeX\tex/latex/pgf/frontendlayer\tikz.sty" ("C:\Program 
Files\MiKTeX\tex/latex/pgf/basiclayer\pgf.sty" ("C:\Program Files\MiKTeX\tex/la
tex/pgf/utilities\pgfrcs.sty" ("C:\Program Files\MiKTeX\tex/generic/pgf/utiliti
es\pgfutil-common.tex"
\[email protected]=\toks25
\[email protected]=\dimen163
\[email protected]=\dimen164
("C:\Program Files\MiKTeX\tex/generic/pgf/utilities\pgfutil-common-lists.tex"))
("C:\Program Files\MiKTeX\tex/generic/pgf/utilities\pgfutil-latex.def"
\[email protected]=\box49
) ("C:\Program Files\MiKTeX\tex/generic/pgf/utilities\pgfrcs.code.tex" ("C:\Pro
gram Files\MiKTeX\tex/generic/pgf\pgf.revision.tex")
Package: pgfrcs 2020/11/23 v3.1.7 (3.1.7)
))
Package: pgf 2020/11/23 v3.1.7 (3.1.7)
("C:\Program Files\MiKTeX\tex/latex/pgf/basiclayer\pgfcore.sty" ("C:\Program Fi
les\MiKTeX\tex/latex/pgf/systemlayer\pgfsys.sty" ("C:\Program Files\MiKTeX\tex/
generic/pgf/systemlayer\pgfsys.code.tex"
Package: pgfsys 2020/11/23 v3.1.7 (3.1.7)
("C:\Program Files\MiKTeX\tex/generic/pgf/utilities\pgfkeys.code.tex"
\[email protected]=\toks26
\[email protected]=\toks27
("C:\Program Files\MiKTeX\tex/generic/pgf/utilities\pgfkeysfiltered.code.tex"
\[email protected]=\toks28
))
\[email protected]=\dimen165
\[email protected]=\dimen166
\[email protected]=\dimen167
\[email protected]=\dimen168
\[email protected]=\dimen169
\[email protected]=\dimen170
\[email protected]=\dimen171
\[email protected]=\dimen172
\[email protected]=\dimen173
\[email protected]=\dimen174
\[email protected]@writea=\write3
\[email protected]@reada=\read2
\[email protected]@counta=\count278
\[email protected]@countb=\count279
\[email protected]@countc=\count280
\[email protected]@countd=\count281
\[email protected]@toka=\toks29
\[email protected]@tokb=\toks30
\[email protected]@tokc=\toks31
\[email protected]@[email protected]=\count282
("C:\Program Files\MiKTeX\tex/generic/pgf/systemlayer\pgf.cfg"
File: pgf.cfg 2020/11/23 v3.1.7 (3.1.7)
)
Driver file for pgf: pgfsys-pdftex.def
("C:\Program Files\MiKTeX\tex/generic/pgf/systemlayer\pgfsys-pdftex.def"
File: pgfsys-pdftex.def 2020/11/23 v3.1.7 (3.1.7)
("C:\Program Files\MiKTeX\tex/generic/pgf/systemlayer\pgfsys-common-pdf.def"
File: pgfsys-common-pdf.def 2020/11/23 v3.1.7 (3.1.7)
))) ("C:\Program Files\MiKTeX\tex/generic/pgf/systemlayer\pgfsyssoftpath.code.t
ex"
File: pgfsyssoftpath.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]@items=\count283
\[email protected]@items=\count284
) ("C:\Program Files\MiKTeX\tex/generic/pgf/systemlayer\pgfsysprotocol.code.tex
"
File: pgfsysprotocol.code.tex 2020/11/23 v3.1.7 (3.1.7)
)) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcore.code.tex"
Package: pgfcore 2020/11/23 v3.1.7 (3.1.7)
("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmath.code.tex" ("C:\Program F
iles\MiKTeX\tex/generic/pgf/math\pgfmathcalc.code.tex" ("C:\Program Files\MiKTe
X\tex/generic/pgf/math\pgfmathutil.code.tex") ("C:\Program Files\MiKTeX\tex/gen
eric/pgf/math\pgfmathparser.code.tex"
\[email protected]=\dimen175
\[email protected]=\count285
\[email protected]=\box50
\[email protected]=\toks32
\[email protected]@operand=\toks33
\[email protected]@operation=\toks34
) ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.code.tex" ("C
:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.basic.code.tex")
("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.trigonometric.c
ode.tex") ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.rando
m.code.tex")
("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.comparison.code
.tex") ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.base.cod
e.tex") ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.round.c
ode.tex") ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.misc.
code.tex")
("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfunctions.integerarithmet
ics.code.tex"))) ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmathfloat.co
de.tex"
\[email protected]@lastzeros=\count286
)) ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfint.code.tex") ("C:\Progra
m Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorepoints.code.tex"
File: pgfcorepoints.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]=\dimen176
\[email protected]=\dimen177
\[email protected]=\dimen178
\[email protected]=\dimen179
\[email protected]=\dimen180
\[email protected]=\dimen181
\[email protected]=\dimen182
\[email protected]=\dimen183
\[email protected]=\dimen184
\[email protected]=\dimen185
\[email protected]=\dimen186
\[email protected]=\dimen187
\[email protected]=\dimen188
\[email protected]=\dimen189
)
("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorepathconstruct.code.
tex"
File: pgfcorepathconstruct.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]@lastx=\dimen190
\[email protected]@lasty=\dimen191
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorepathusage.code.te
x"
File: pgfcorepathusage.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]@[email protected]=\dimen192
\[email protected]@[email protected]=\dimen193
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorescopes.code.tex"
File: pgfcorescopes.code.tex 2020/11/23 v3.1.7 (3.1.7)
\pgfpic=\box51
\[email protected]=\box52
\[email protected]@main=\box53
\[email protected]@[email protected]=\count287
)
("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoregraphicstate.code.t
ex"
File: pgfcoregraphicstate.code.tex 2020/11/23 v3.1.7 (3.1.7)
\pgflinewidth=\dimen194
)
("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoretransformations.cod
e.tex"
File: pgfcoretransformations.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]@x=\dimen195
\[email protected]@y=\dimen196
\[email protected]@temp=\dimen197
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorequick.code.tex"
File: pgfcorequick.code.tex 2020/11/23 v3.1.7 (3.1.7)
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoreobjects.code.tex"
File: pgfcoreobjects.code.tex 2020/11/23 v3.1.7 (3.1.7)
)
("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorepathprocessing.code
.tex"
File: pgfcorepathprocessing.code.tex 2020/11/23 v3.1.7 (3.1.7)
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorearrows.code.tex"
File: pgfcorearrows.code.tex 2020/11/23 v3.1.7 (3.1.7)
\pgfarrowsep=\dimen198
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoreshade.code.tex"
File: pgfcoreshade.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]=\dimen199
\[email protected]@[email protected]@num=\count288
\[email protected]=\count289
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoreimage.code.tex"
File: pgfcoreimage.code.tex 2020/11/23 v3.1.7 (3.1.7)
("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoreexternal.code.tex"
File: pgfcoreexternal.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]=\box54
)) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorelayers.code.tex"
File: pgfcorelayers.code.tex 2020/11/23 v3.1.7 (3.1.7)
)
("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcoretransparency.code.t
ex"
File: pgfcoretransparency.code.tex 2020/11/23 v3.1.7 (3.1.7)
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorepatterns.code.tex
"
File: pgfcorepatterns.code.tex 2020/11/23 v3.1.7 (3.1.7)
) ("C:\Program Files\MiKTeX\tex/generic/pgf/basiclayer\pgfcorerdf.code.tex"
File: pgfcorerdf.code.tex 2020/11/23 v3.1.7 (3.1.7)
))) ("C:\Program Files\MiKTeX\tex/generic/pgf/modules\pgfmoduleshapes.code.tex"
File: pgfmoduleshapes.code.tex 2020/11/23 v3.1.7 (3.1.7)
\pgfnodeparttextbox=\box55
) ("C:\Program Files\MiKTeX\tex/generic/pgf/modules\pgfmoduleplot.code.tex"
File: pgfmoduleplot.code.tex 2020/11/23 v3.1.7 (3.1.7)
) ("C:\Program Files\MiKTeX\tex/latex/pgf/compatibility\pgfcomp-version-0-65.st
y"
Package: pgfcomp-version-0-65 2020/11/23 v3.1.7 (3.1.7)
\[email protected]=\dimen256
\[email protected]=\dimen257
) ("C:\Program Files\MiKTeX\tex/latex/pgf/compatibility\pgfcomp-version-1-18.st
y"
Package: pgfcomp-version-1-18 2020/11/23 v3.1.7 (3.1.7)
)) ("C:\Program Files\MiKTeX\tex/latex/pgf/utilities\pgffor.sty" ("C:\Program F
iles\MiKTeX\tex/latex/pgf/utilities\pgfkeys.sty" ("C:\Program Files\MiKTeX\tex/
generic/pgf/utilities\pgfkeys.code.tex")) ("C:\Program Files\MiKTeX\tex/latex/p
gf/math\pgfmath.sty" ("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmath.cod
e.tex")) ("C:\Program Files\MiKTeX\tex/generic/pgf/utilities\pgffor.code.tex"
Package: pgffor 2020/11/23 v3.1.7 (3.1.7)
("C:\Program Files\MiKTeX\tex/generic/pgf/math\pgfmath.code.tex")
\[email protected]=\dimen258
\[email protected]=\dimen259
\[email protected]=\toks35
\[email protected]=\toks36
)) ("C:\Program Files\MiKTeX\tex/generic/pgf/frontendlayer/tikz\tikz.code.tex"
Package: tikz 2020/11/23 v3.1.7 (3.1.7)

("C:\Program Files\MiKTeX\tex/generic/pgf/libraries\pgflibraryplothandlers.code
.tex"
File: pgflibraryplothandlers.code.tex 2020/11/23 v3.1.7 (3.1.7)
\[email protected]@[email protected]=\count290
\pgfplotmarksize=\dimen260
)
\[email protected]=\dimen261
\[email protected]=\dimen262
\[email protected]=\dimen263
\[email protected]=\dimen264
\[email protected]=\dimen265
\[email protected]=\dimen266
\tikzleveldistance=\dimen267
\tikzsiblingdistance=\dimen268
\[email protected]=\box56
\[email protected]@bg=\box57
\[email protected]=\box58
\[email protected]@bg=\box59
\tikztreelevel=\count291
\tikznumberofchildren=\count292
\tikznumberofcurrentchild=\count293
\[email protected]@count=\count294
("C:\Program Files\MiKTeX\tex/generic/pgf/modules\pgfmodulematrix.code.tex"
File: pgfmodulematrix.code.tex 2020/11/23 v3.1.7 (3.1.7)
\pgfmatrixcurrentrow=\count295
\pgfmatrixcurrentcolumn=\count296
\[email protected]@numberofcolumns=\count297
)
\[email protected]=\count298

("C:\Program Files\MiKTeX\tex/generic/pgf/frontendlayer/tikz/libraries\tikzlibr
arytopaths.code.tex"
File: tikzlibrarytopaths.code.tex 2020/11/23 v3.1.7 (3.1.7)
)))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11 \fancypagestyle{plain}[f
                             ancy]{} 
Here is how much of TeX's memory you used:
 21616 strings out of 479799
 380717 string characters out of 2879601
 671144 words of memory out of 3000000
 38283 multiletter control sequences out of 15000+200000
 538078 words of font info for 30 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 86i,0n,89p,513b,271s stack positions out of 5000i,500n,10000p,200000b,50000s

!  ==> Fatal error occurred, no output PDF file produced!

Answers

To give you something to start with, you can use fancyhdr and tikz to design your own header:

---
title: "Untitled"
author: "Name"
date: "4/8/2021"
output: 
  pdf_document:
    keep_tex: true
header-includes:
   - \include{preamble}      
---

test

\newpage

test

and preamble.tex:

\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{tikz}
\fancyhead{%
  \begin{tikzpicture}[remember picture, overlay, outer sep=0pt, inner sep=0pt]
  \fill[blue] (-18,5.5) rectangle ++(\paperwidth,-4cm);
  \node at (-17,3) {\includegraphics[width=2cm]{example-image}};
  \node[green,font=\large\sffamily\bfseries] at (-14,3) {some text};
  \end{tikzpicture}
}
\fancypagestyle{plain}[fancy]{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{4cm}
Posted on by samcarter_is_at_topanswers.xyz