View source: R/docx_header_logo.R
manage_docx_header_logos | R Documentation |
Takes an existing Word document created using the reschola
templates
and adds (by default, or replaces if action = "replace_schola"
) the logo with
the image file you point it to.
manage_docx_header_logos(
docx_path,
png_logo_path,
action = c("add_client", "replace_schola"),
height = NULL
)
docx_path |
The Word document in which to replace logos. Must contain the bookmarks
|
png_logo_path |
a PNG file which will be added/used as replacement |
action |
whether to add new logo on the right ( |
height |
height of the new logo in the resulting document, in |
invisibly returns the name of the new Word doc, which is same as the input Word doc,
with an an added _addedlogo
suffix.
This requires specific bookmarks in the header of the input document. This is taken from the skeleton.docx template in the template components. If you overwrite the header in the input document, this function will not work.
Other Workflow helpers:
draft_pdf()
,
gd_download_folder()
## Not run:
library(reschola)
manage_docx_header_logos("draft.docx",
png_logo_path = "logos/newlogo.png",
action = "add_client"
)
manage_docx_header_logos("draft.docx",
png_logo_path = "logos/newlogo.png",
action = "replace_schola"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.