Skip to content

Commit

Permalink
fix flextable_to_rmd() issue with images in pdf
Browse files Browse the repository at this point in the history
fix #651
  • Loading branch information
davidgohel committed Aug 14, 2024
1 parent e29a47d commit 0603608
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: flextable
Title: Functions for Tabular Reporting
Version: 0.9.7.006
Version: 0.9.7.007
Authors@R: c(
person("David", "Gohel", , "[email protected]", role = c("aut", "cre")),
person("ArData", role = "cph"),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- fix broken internal links in PDF file, probably due to a change in knitr or
rmarkdown (issue #632)
- fix right outer border issue in grid format (issue #650)
- fix `flextable_to_rmd()` issue with images in pdf (issue #651)

# flextable 0.9.6

Expand Down
6 changes: 5 additions & 1 deletion R/printers.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ flextable_to_rmd <- function(x, ...) {
tmp_file,
useBytes = TRUE)

z <- knit_child(input = tmp_file, envir = environment(), quiet = TRUE)
z <- knit_child(
input = tmp_file,
options = list(fig.path=tempfile()),
envir = environment(), quiet = TRUE)

cat(z, sep = '\n')

invisible("")
Expand Down

0 comments on commit 0603608

Please sign in to comment.