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

Wrong inner borders of merged cells in PDF when bg is specified #673

Open
eloimercier-stemcell opened this issue Jan 6, 2025 · 0 comments

Comments

@eloimercier-stemcell
Copy link

When bg() is specified, the inner borders of individual cells are still displayed even in the merged cells. This only occurs in PDF.
Removing the background colour fixes this issue. fix_border_issues() does not help here.

Reproducible example

library(flextable)
library(officer)
library(dplyr)

data_1 <- data.frame(col1 = c("A1", "A1", "A1"),
col2 = c("B1", "B2", "B3"))
ft <- flextable(data_1)
ft <- ft %>% bg(i=1, bg = "grey90", part = "header") #removing this row fixes the issue
ft <- ft %>% merge_v( j = ~ col1)
ft <- ft %>% border_inner( part="body", border = fp_border(color="red", width = 2) )

print(ft) # the inner borders are displayed properly
print(ft, preview = "pdf") # the inner borders are displayed incorrectly in the merged cells

image

@eloimercier-stemcell eloimercier-stemcell changed the title Wrong inner border of merge cells in PDF when bg is specified Wrong inner borders of merged cells in PDF when bg is specified Jan 6, 2025
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

No branches or pull requests

1 participant