Skip to content

paragraph border missing after flextable v0.9.11 #716

@eanokian

Description

@eanokian

Hi David,

I noticed that paragraph borders in flextables objects stopped being displayed or exported in docx after the CRAN release of flextable v0.9.11.

For example, the following code does not show the paragraph borders when using flextable v0.9.11:

border <- flextable::fp_border_default(width = 0.75, color = "black")
temp <- flextable::qflextable(head(iris, 10)) |>
  flextable::border_remove()
temp <- flextable::add_header_row(temp, values = c("Sepal", "Petal", "Species"), colwidths = c(2, 2, 1))
temp <- flextable::style(
  x = temp,
  part = "header",
  i = 1,
  j = c(1, 3),
  pr_p = officer::fp_par(
    border.bottom = border,
    text.align = "center"
  )
)
doc <- officer::read_docx()
doc <- flextable::body_add_flextable(doc, temp, align = "center")
print(doc, target = "test.docx")

but the same code works fine after installing flextable v0.9.10:

remotes::install_version(package = "flextable", version = "0.9.10")

In case you're wondering, I need to use specifically paragraph borders, so functions like flextable::border() do not fit my purpose.
Does this make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions