ph_location_type {officer} | R Documentation |
The function will use the type name of the placeholder (e.g. body, title), the layout name and few other criterias to find the corresponding location.
ph_location_type(type = "body", position_right = TRUE, position_top = TRUE, ...)
type |
placeholder type to look for in the slide layout, one of 'body', 'title', 'ctrTitle', 'subTitle', 'dt', 'ftr', 'sldNum'. |
position_right |
the parameter is used when a selection with above
parameters does not provide a unique position (for example
layout 'Two Content' contains two element of type 'body').
If |
position_top |
same than |
... |
unused arguments |
The location of the bounding box associated to a placeholder within a presentation slide is specified with the left top coordinate, the width and the height. These are defined in inches:
left coordinate of the bounding box
top coordinate of the bounding box
width of the bounding box
height of the bounding box
In addition to these attributes, there is attribute ph_label
associated with the shape (shapes, text boxes, images and other objects
will be identified with that label in the Selection Pane of PowerPoint).
This label can then be reused by other functions such as ph_add_fpar
,
or ph_add_text
.
Other functions for placeholder location: ph_location_fullsize
,
ph_location_label
,
ph_location_left
,
ph_location_right
,
ph_location
library(magrittr) read_pptx() %>% add_slide(layout = "Title and Content", master = "Office Theme") %>% ph_with("Hello world", location = ph_location_type(type = "body") ) %>% print(target = tempfile(fileext = ".pptx") )