Hi,
My problem is relatively straightforward: how am we supposed to use page_mar function to set the margin properties of a Word document with the officer package? I could not find the answer on any forum or in the documentation of officer
# This does not work
library(officer)
library(magrittr)
str1 <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
my_doc <- read_docx()
prop_section(
page_size = page_size(),
page_margins = page_mar(
bottom = 1.25,
top = 1.25,
right = 1,
left = 1.5,
header = 0.75,
footer = 0.75,
gutter = 0
)
)
my_doc <- my_doc %>%
body_add_par(value = str1, style = "Normal")
print(my_doc, target = "testdoc.docx")
Any input will be greatly appreciated.