davidgohel/flextable

Overlapping Lines in SVG Export (flextable 0.9.6)

mbrunner23 opened this issue · 1 comments

Hi,

I'm encountering an issue with the flextable package (version 0.9.6) when exporting tables to SVG format. The vertical lines (vline) are displayed on both the right and left sides of the cells, leading to an undesirable overlap, especially when using different line colors. Similar issue to #63

Below is a reproducible example to demonstrate the issue:

library(flextable)

data <- data.frame(
  Header1 = c("A", "B", "C"),
  Header2 = c(1, 2, 3)
)

ft <- flextable(data)

ft <- vline(ft, j = c(1, 2), border = fp_border(color = "red", width = 1))

save_as_image(x = ft, path = "test_flextable.svg")
Screenshot 2024-07-26 at 09 44 05

Steps to reproduce:

  1. Run the provided code.
  2. Open the generated SVG file (test_flextable.svg).
  3. Notice that the vertical lines are shown on both the right and left sides of the cells.

This overlapping of vertical lines is problematic, especially when different line colors are used.

It should be fixed now