通过R创建可填写的PDF文本框

Bad*_*ger 7 pdf markdown r

我使用R Markdown的测试文件,通过简单创建一个新的markdown文件在RStudio中生成.它看起来如下:

---
title: "Fillable Textbox?"
author: "The Need To Edit"
date: "Wednesday, October 21, 2015"
output: pdf_document
---

  This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r}
summary(cars)
```

You can also embed plots, for example:

```{r, echo=FALSE}
plot(cars)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
Run Code Online (Sandbox Code Playgroud)

我的问题:

是否可以在PDF表单中创建可填写的文本框?

我正在努力自动化我的一些工作流程,但在该自动化中最终用户可能需要添加注释.我认为可填写的文本框是维护标准文档格式并为我的用户提供一些自由的好方法.除了添加一个可填写的文本框之外,我已经找到了做几乎所有事情的方法,也许我正在搜索错误的表达式?

Sab*_*DeM 9

hyperref包(自动加载)允许可填写字段.这只是一个使用它的特定命令的问题,你可以在这里找到.试试这段代码(点击单词右侧Name).

---
title: "Fillable Textbox?"
author: "The Need To Edit"
date: "Wednesday, October 21, 2015"
output: pdf_document
---

Since Rmarkdown uses knitr and it loads automatically hyperref I think hat this should work.

In fact it is just a matter of use some \LaTeX\ commands of the hyperref package.

```{r, echo=FALSE}
plot(cars)
```


\begin{Form}
    \TextField{Name}
\end{Form}
Run Code Online (Sandbox Code Playgroud)

当然这个PDF可以作为PDF填充,然后它将无法在RStudio(如果你使用它)PDF查看器内部工作.