pandoc 或 libreoffice 将多个 .docs 转换为 R 中的 pdf
我正在尝试在 R 中将文档从 .docx 批量转换为 .pdf。我的文档包含在以下文件结构中: 1 级文件夹 --> 2 级文件夹 --->文件 在 2 级文件夹中,某些文件已经是 pdf 文件,其他文件是文档文件。
我想知道是否有一种方法可以设置 pandoc 文件路径命令,它读取 2 级文件夹中哪些文件是 .docx,然后进行转换。
I am trying to batch convert documents from .docx to .pdf in R. My documents are contained in the following file structure: Level 1 Folders --> Level 2 Folders ---> Files
Within the level 2 folders, some files are already pdf and others are document.
I'm wondering if there is a way to set up pandoc file path command that it reads which files are .docx within a level 2 folder and then converts those.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个不使用 pandoc 而是使用 RDCOMClient 的解决方案。我想你可能会感兴趣。
您可以获得要转换的 .docx 文件的列表并使用“for 循环”。
Here is a solution not with pandoc but with RDCOMClient. I thought it might be of interest to you.
You can get a list of the .docx file you want to convert and use a "for loop".