我正在创建一个调查问卷,希望允许用户将结果保存为pdf. 。
html看起来很好!但是printing制作了这张图片,到目前为止还没有什么效果。

编辑:--我添加了一个关于页面向下包的合适的报价,可能描述了这个问题:
“.试着从你的一个Rmarkdown文件中生成PDF,我指的是那种将图像从一页到另一页,文字被一分为二的文档(是的,我知道我知道…的意思)。”
# YAML
---
output:
pdf_document: #html?
fig_crop: false # doesn't work
---
---
output:
pagedown::html_paged: # doesn't work
css: ["default-fonts", "default-page", "default"]
---
# CSS line-breaks
<style media="print">
html, body, p, hr, img {
break-after: avoid !important; # doesn't work
break-before: avoid !important; # doesn't work
break-inside: always !important; # doesn't work
}
</style>
# Button
<input type="button" value="Print this page" onClick="window.print()"># Example Plot
```{r echo=FALSE, message=FALSE}
library(ggplot2)
Plot <- ggplot(mpg, aes(displ, cty)) + geom_point()
Plot + facet_grid(rows = vars(drv))
plot.height <- 45
```
# Calling the plot (with fig.height)
```{r, fig.height=plot.height, strip.white = TRUE} # doesn't work
plot(Plot)
```下面是实现的示例:由于某种原因,https://exampleruntest.formr.org示例绘图没有在绘图之前引入换行,而是在绘图之后引入行中断。
我希望有人有个主意
https://stackoverflow.com/questions/63284371
复制相似问题