Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add ph_location_id() as a new member to the ph_location_* family (#606) #609

Merged

Conversation

markheckmann
Copy link
Contributor

Add ph_location_id() as a new member to the ph_location_* family. It references a placeholder via its unique id (see #606, suggestion 4).


Example

doc <- read_pptx()
doc <- add_slide(doc, "Comparison")
plot_layout_properties(doc, "Comparison")

Placeholder ids in green color in upper right corners.

image

doc <- ph_with(doc, "The Title", location = ph_location_id(id = 2)) # title
doc <- ph_with(doc, "Left Header", location = ph_location_id(id = 3)) # left header
doc <- ph_with(doc, "Left Content", location = ph_location_id(id = 4)) # left content
doc <- ph_with(doc, "The Footer", location = ph_location_id(id = 8)) # footer

file <- tempfile(fileext = ".pptx")
print(doc, file)
file.show(file) # may not work on your system

image

`ph_location_id()`is a new member in the `ph_location_*`
family. It references a placeholder via its unique id (davidgohel#606)
@davidgohel
Copy link
Owner

thanks @markheckmann

@davidgohel davidgohel merged commit 1ea1c95 into davidgohel:master Sep 23, 2024
3 checks passed
@markheckmann markheckmann deleted the issue_606_add_ph_location_id branch October 1, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants