when I try to render a long flextable with rmarkdown and the "pdf_document" format, the table does not split across multiple pages and the cell content gets truncated.
The rendered pdf document is 4 page long:
the first page shows the heading ("Test bug") and nothing else;
the second page is blank;
the table starts in the third page with two consecutive headers (repeated), and the cell contents get printed up to the bottom border of the page
the fourth page shows only the table header
This is a minimal reproducible example of the .Rmd document:
Hello,
when I try to render a long flextable with
rmarkdown
and the"pdf_document"
format, the table does not split across multiple pages and the cell content gets truncated.The rendered pdf document is 4 page long:
This is a minimal reproducible example of the .Rmd document:
Test bug
R version 4.2.3 (2023-03-15 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale: [1] LC_COLLATE=Italian_Italy.utf8 LC_CTYPE=Italian_Italy.utf8 LC_MONETARY=Italian_Italy.utf8 [4] LC_NUMERIC=C LC_TIME=Italian_Italy.utf8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] stringi_1.7.12 flextable_0.9.1
loaded via a namespace (and not attached): [1] zip_2.3.0 Rcpp_1.0.10 fontBitstreamVera_0.1.1 [4] compiler_4.2.3 later_1.3.1 gfonts_0.2.0
[7] tools_4.2.3 uuid_1.1-0 digest_0.6.31
[10] evaluate_0.21 jsonlite_1.8.5 lifecycle_1.0.3
[13] rlang_1.1.1 shiny_1.7.4 cli_3.6.1
[16] rstudioapi_0.14 crul_1.4.0 curl_5.0.0
[19] fontLiberation_0.1.0 xfun_0.39 fastmap_1.1.1
[22] xml2_1.3.4 officer_0.6.2 knitr_1.43
[25] gdtools_0.3.3 systemfonts_1.0.4 askpass_1.1
[28] grid_4.2.3 glue_1.6.2 httpcode_0.3.0
[31] data.table_1.14.8 R6_2.5.1 textshaping_0.3.6
[34] rmarkdown_2.22 magrittr_2.0.3 fontquiver_0.2.1
[37] promises_1.2.0.1 htmltools_0.5.5 ellipsis_0.3.2
[40] mime_0.12 xtable_1.8-4 httpuv_1.6.11
[43] ragg_1.2.5 openssl_2.0.6 crayon_1.5.2