jakzr
jakzr

Reputation: 159

R package Reporters can't set height and width of a new paragraph

I'm trying to add a paragraph in an pptx object in R using ReporteRs, but I can't set the height and the width even when using the right arguments.

For example :

doc = pptx()

doc <- addSlide(doc, "Slide")

doc <- addParagraph(doc,"ok",height=2,width=2,offx = 0,offy = 0)

writeDoc(doc, "test.pptx" )

Anyone manage to get a paragraph with custom sizes ?

Thank you

Upvotes: 0

Views: 55

Answers (1)

David Gohel
David Gohel

Reputation: 10695

The following should solve your issue

library(ReporteRs)
doc = pptx()
doc <- addSlide(doc, "Title and Content")
doc <- addParagraph(doc, 
                    pot("ok"), 
                    par.properties = parProperties(),height=2,width=2,offx = 0,offy = 0)
writeDoc(doc, "test.pptx" )

Upvotes: 1

Related Questions