打印发票、提货单等的最佳方式
嗯,这是我的场景。
使用 SQL Express 作为数据库的客户端/服务器 winform 应用程序。 我需要能够打印发票、装箱单等。
我希望客户能够修改发票。 IE。 能够放置他们的徽标或更改字体大小等...基本上格式化显示。
到目前为止我考虑过的事情是。
1)使用模板引擎(类似于codesmith或my Generation)并使用输出HTML的模板。 然后打印html页面。
2) 在本地模式下使用ReportViewer。 我听说用户可以下载一个 web devexpress 插件并编辑本地报告文件。 谁能证实这一点吗?
3) 在远程模式下使用Reportviewer。
我对 ReportViewer 没有太多经验,所以我不确定是否应该使用本地或远程模式。
你们中以前做过这种事的人有什么建议吗?
Well, heres my scenario.
Client/Server winforms application with SQL Express as the DB. I need to be able to print invoice, packing slips etc..
i would like the customer to be able to modify the invoices. ie. be able to put their logo or change font sizes etc...basically format the display.
Things i have considered so far are.
1) Use a template engine (similar to codesmith or mygeneration) and use templates that output HTML. Then print the html page.
2) Use ReportViewer in local mode. I've heard that users can download a plugin for web dev express and edit the local report files. can anyone confirm this?
3) Use Reportviewer in remote mode.
I don't have much experience with ReportViewer so I'm not sure if i should use local or remote mode as well.
Those of you that have done this kind of thing before whats your recommendation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在用它完成一个项目后,我衷心推荐 iTextSharp 将发票和其他表单创建为 PDF。 除了从头开始创建 PDF 之外,您还可以使用它来填写使用 Acrobat(甚至 MS Office/OpenOffice)创建的 PDF 表单和/或模板。 而且它是免费的。
它在 Windows 应用程序或 ASP.Net 应用程序中使用起来非常容易。 大多数文档和书籍(iText in Action,例如)是关于原始 Java 版本 iText。 不过,有关于转换过程的教程和示例代码,而且在大多数情况下,所有函数和库在 .Net 版本中的工作方式都是相同的,因此改编本书和参考代码没有问题。
我确实经历了惨痛的教训才知道 HTML 和 CSS 对于浏览器来说非常有用(好吧,除了“每个浏览器对它的解释不同”问题之外都很好),但对于试图生成一致的、有吸引力的、精确的打印输出和表单来说却很糟糕。
After just completing a project with it, I would heartily recommend iTextSharp to create your invoices and other forms as PDFs. In addition to creating PDFs from scratch, you can also use it to fill in PDF forms and/or templates created with Acrobat (or even MS Office/OpenOffice). And it's free.
It's pretty easy to use in Windows apps or in ASP.Net applications. Most of the documentation and the books on it (iText in Action, for example) are about the original Java version, iText. However, there are tutorials and example code on the conversion process and, for the most part, all of the functions and libraries work the same in the .Net version, so adapting the book and reference code has been no problem.
I definitely learned the hard way that HTML and CSS are great for browsers (well, great except for the "every browser interprets it different" problem), but horrible for trying to generate consistent, attractive, and precise printed output and forms.
我个人使用 Aspose Words:他们使用Word文档作为模板,我使用Words书签功能来标记和检索我需要填写的字段。
Aspose 可以很好地与表格配合使用(即:您可以向表格添加行等),并将 Word 文档视为 XML 文档。 然后您可以将文档另存为 MSWord 或 PDF。
我不会说它是世界上最伟大的图书馆,但它绝对值得一看:)
I'm personally using Aspose Words: they use word documents as templates, and I'm using Words bookmarks function to mark and retrieve the fields I need to fill.
Aspose works nicely with Tables (ie: you can add lines to a table, etc...) and sees Word documents as XML documents. You can then save the document as MSWord or PDF.
I wouldn't say it's the greatest library in the world, but it's definitely worth having a look :)
您可以为此使用水晶报表。 但首先您需要扫描发票并将其保存为图像,
下一步是在水晶报表上将图像导出到其上,然后将字段拖动到发票上必须打印的位置(图像作为您的指南)。 然后,一切设置完毕后,删除图像并尝试。
希望这可以帮助。
you can use Crystal Report for this. But first you need to scan the INVOICE and save it as an image,
Next is, on your crystal report, export the image on to it, and DRAG the fields to where they must print on the invoice (IMAGE SERVES AS YOUR GUIDE). Then after everything has been set-up, DELETE THE IMAGE and try it.
hope this helps.