Skip to content

Commit

Permalink
Merge pull request #103 from rsaite/SplitPDFPagesA4
Browse files Browse the repository at this point in the history
Fix pdf printing on separate pages for A4 format
  • Loading branch information
jhelvy authored Sep 12, 2024
2 parents d3bb943 + 149c091 commit 5dbcab5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/printA4.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ params:
path: NA
---

```{r, echo=FALSE, out.width="100%", warning=FALSE, message=FALSE}
image_read(params$path)
```{r, echo=FALSE, results="asis", warning=FALSE, message=FALSE, out.width="100%"}
# Known issue for knitr include_graphics: https://stackoverflow.com/questions/51268623/insert-images-using-knitrinclude-graphics-in-a-for-loop
# Can't image_read outside top-level. So cheat and output markdown format image
# inclusion and use result="asis"
for(path in params$path){
cat(paste0("![](", path, ")"), "\n")
}
```

0 comments on commit 5dbcab5

Please sign in to comment.