简体   繁体   English

如何在C#中使用Word中的“打印到文件”选项创建后记文件?

[英]How to create a postscript file using print to file option in word with C#?

我想使用Microsoft Word和C#中的打印到文件从Word文档(.doc)创建一个Postscript文件,我发现了很多打印文件的方法,但是找不到“打印到文件”。

Unless things have changed, you don't 'print to file' you 'print to a printer on FILE:' 除非情况有所变化,否则您不会“打印到文件”,也不会“打印到FILE上的打印机”:

So what you need to do is create a printer instance using the driver of your choice, and have it send its data to the FILE: hardware (rather than LPT!: COM!: USB001: etc). 因此,您需要做的是使用您选择的驱动程序创建一个打印机实例,并将其数据发送到FILE:硬件(而不是LPT !: COM !: USB001:等)。

On Windows versions up to 7 (I have no information yet on Windows 8) it is possible to create a Port Monitor and install that, this can then write the data to file instead. 在Windows 7或更高版本(Windows 8上我还没有信息)上,可以创建一个端口监视器并进行安装,然后可以将数据写入文件。 You still have to create a printer instance which uses that Port Monitor though. 您仍然必须创建一个使用该端口监视器的打印机实例。

Add a new printer. 添加新的打印机。

Select - Local printer attached to this printer 选择-此打印机连接的本地打印机

Use port - FILE: (print to file) 使用端口-FILE :(打印到文件)

Choose a postscript printer from the list, such as an Apple LaserWriter 16/600 PS (or an 11x17 printer for larger output or an imagesetter for variable page size ability) 从列表中选择一个后记打印机,例如Apple LaserWriter 16/600 PS(或用于较大输出的11x17打印机或用于可变页面大小功能的照排机)

Then just print to the printer 然后只需打印到打印机

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM