Windows 10从命令行打印为PDF [英] Windows 10 Print to PDF from command-line

查看:334
本文介绍了Windows 10从命令行打印为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在纠正学生的作业,我想自动执行我总是要做的一个烦人的步骤.
在注释了他们的PDF解决方案之后,我需要将它们打印到PDF文件中,以便将我的注释烘烤到PDF中,以便可以将它们包含在LaTeX中.现在,我必须手动选择"Microsoft Print to PDF",并输入PDF名称,并带有下划线(这是我自动生成的LaTeX文件所期望的).对于30多个文件,这很烦人.
因此,我想针对所有PDF自动以批处理脚本的形式发布此文件,以最大程度地减少双击所需的精力.我已经看到这是可能的,例如C#(此处),但我想要一个带有简单批处理脚本的解决方案.
能做到吗?

I'm correcting assignments from my students right now and I'd like to automate an annoying step I always have to do.
After annotating their PDF solutions, I need to Print them to PDF files in order to bake my annotations into the PDF so that they can be included in LaTeX. Right now I have to manually choose "Microsoft Print to PDF" and enter the PDFs name with a leading underscore (which is what my automatically generated LaTeX files expect). This gets annoying for 30+ files.
So I'd like to issue this in a batch-script automatically for all the PDFs to minimize my efforts to a simple double-click. I have seen that this is possible with e.g. C# (Here), but I'd like a solution with a simple batch script.
Can this be done?


我发现的C#代码实际上无法完成任务.您不能以这种方式打印现有 PDF.我需要使用Spire.PDF来做到这一点.但是,免费版本使PDF混乱.我可以在NuGet中下载完整"版本,但是这会在任何PDF的开头生成免责声明,并且仍然无法处理我在Adobe Reader DC中绘制的内容.因此,C#确实不是一个选择,我需要一个命令行解决方案.


The C#-Code I found actually does not get the Job done. You can't print existing PDFs that way. I'd need to use Spire.PDF to do that. The Free Version however messes up the PDF; I can download the "Full" version in NuGet, this however generates a disclaimer at the beginning of any PDF, and it still can't handle things I draw in Adobe Reader DC. So C# really is not an option, I need a command-line solution.

推荐答案

您最好安装 pdfcreator

并使用命令行选项

这篇关于Windows 10从命令行打印为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆