简体   繁体   English

打印PDF和自定义标签尺寸

[英]Print PDF and Custom Label Size

I am generating PDF document using iTextSharp (winforms), now i need to print this generated PDF document using a Label Printer. 我正在使用iTextSharp(winforms)生成PDF文档,现在我需要使用标签打印机打印此生成的PDF文档。

I have multiple Printers installed on my machine, so with VB.net I need to Select a certain Thermal printer. 我的机器上安装了多台打印机,因此要使用VB.net,我需要选择某个热敏打印机。

Once the Printer is Selected I need to Specify Shipping Label Size (width & height). 选择打印机后,我需要指定运输标签的尺寸(宽度和高度)。

So Once Label Printer is selected and I specified custom Label dimensions , I would like the label to be printed without any user action (Like skip the Confitm box to print). 因此,一旦选择了标签打印机并指定了自定义标签尺寸 ,我希望无需任何用户操作即可打印标签(例如,跳过“适应”框进行打印)。

I dont need the full code, I just need someone to put me into right direction. 我不需要完整的代码,我只需要有人将我带入正确的方向。

Thanks 谢谢

You can use the PrintDocument object. 您可以使用PrintDocument对象。 Use the Print method, and do the actual printing in the PrintPage handler. 使用Print方法,并在PrintPage处理程序中进行实际的打印。 To do this, you can output to the graphics object of the parameter PrintPageEventArgs in your PrintPage handler. 为此,可以在PrintPage处理程序中将参数PrintPageEventArgs输出到图形对象。

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

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