简体   繁体   English

在VB.Net/C#中打印表单应用程序 - 布局设计器?

[英]Printing in VB.Net/C# Forms Application — Layout Designer?

I maintain a vb.net forms application that prints various labels to label printers. 我维护一个vb.net表单应用程序,可以打印标签打印机的各种标签。 (Label printers are just like any printer, just smaller print area/lower resolution) (标签打印机就像任何打印机一样,只是更小的打印区域/更低的分辨率)

The system uses a legacy printing method that's supported in the printer hardware, but has been out of general use for over a decade. 该系统使用打印机硬件支持的传统打印方法,但十多年来一直不常用。 I'm adding logic to print from the PrintDocument class. 我正在添加逻辑来从PrintDocument类打印。 I like the flexibility of the class, but layout is a bit tedious. 我喜欢课堂的灵活性,但布局有点乏味。 (Defining the sizes/locations of each DrawString command, etc.) (定义每个DrawString命令的大小/位置等)

Are there any software products or open source UI designers for generating print document layout? 是否有用于生成打印文档布局的软件产品或开源UI设计器? The designer output must be something I can integrate into my code (dll is OK, just not a separate executable) and can not have a per user license. 设计器输出必须是我可以集成到我的代码中的东西(dll是好的,不是单独的可执行文件)并且不能拥有每用户许可证。 (Lots of users on my system) (我系统上有很多用户)

Have a look at this thread Visual Print Design for .NET . 看看这个线程Visual Print Design for .NET

Also, you might consider a PDF template that you can inject with the values, then print the PDF, not perfect, but it could work depending on your needs. 此外,您可能会考虑使用值注入的PDF模板,然后打印PDF,不完美,但它可以根据您的需要工作。

当我寻找类似的需求时,我遇到了一些解决方案,这些解决方案作为名片设计师推销,看起来很合适。

Since what I need is fairly simple I went ahead and rolled my own simple desinger. 因为我需要的是相当简单的我继续前进并推出了我自己的简单desinger。 Found at a great little class that makes controls movable/resizable which saved a bunch of time. 发现在一个很棒的小班上 ,使控件可移动/可调整大小,节省了大量的时间。 Thanks all for the ideas. 谢谢大家的想法。

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

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