在 Power Builder V12 Web 应用程序中打印(Web 表单)
我想知道Power Builder V12 Web应用程序(Web Forms)中的打印方式 [Power Builder Web应用程序转换为ASP.Net Web应用程序]
此功能是PowerBuilder V12中的新功能,可用的示例和文档很少。
我知道没有直接的打印方法,因为需要定义虚拟打印机 然后准备要打印的文档并将其发送到该打印机。
如果任何用户之前尝试过该操作或有任何示例,请将其发送给我。
提前致谢 ..
I would like to know the way of printing in Power Builder V12 Web Application(Web Forms) [Power Builder Web Application is converted to ASP.Net Web Application]
This feature is new in PowerBuilder V12 and few examples and documentation are available.
I know there is no direct way for printing as there is a need to define a virtual printer
then prepare the document to be printed and send it to that printer.
If any user tried that before or has any examples for that please send them for me.
Thanks in Advance ..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 PB Web Forms 中,我确定了三种打印方式。我假设您指的是打印 DataWindows,因为这在 PowerBuilder 应用程序中最常见。
首先是不对代码执行任何操作,让 PowerBuilder 处理 DataWindow.Print() 函数调用。它创建 UI 元素来链接到“打印管理器”窗口,该窗口正在为用户生成 PDF,然后用户可以从打印管理器下载该 PDF。
其次是利用 DataWindow.SaveAs (..., PDF!) 功能,并在您自己的触发器上调用 DownloadFile() 函数。这实现了与第一个相同的目标,但允许您管理自己的 UI。
第三种方法是在页面上显示数据窗口,并使用调用 JavaScript 的按钮来触发浏览器自己的打印命令。使用此选项您可能会失去一些格式控制,但它允许执行实际的打印功能,而不仅仅是生成 PDF。
仅供参考,从 PowerBuilder 自 11.0 版本以来一直存在。那是我开始使用它的时候,这就是我想出这些选项的原因。 (这些事情对我来说需要时间。)
祝你好运,
特里。
In PB Web Forms, I've identified three ways of printing. I'm going to assume you mean printing DataWindows, as that is most common in PowerBuilder applications.
First is to do nothing to your code and let PowerBuilder handle the DataWindow.Print() function calls. It creates UI elements to link to a "Print Manager" window which is generating PDFs for your user, which the user can then download from the Print Manager.
Second is to leverage the DataWindow.SaveAs (..., PDF!) functionality, and calling the DownloadFile() function on your own trigger. This achieves the same ends as the first, but allows you to manage your own UI.
Third is to show the DataWindow on a page, and use a button that calls JavaScript to fire the browser's own print command. You probably lose some formatting control with this option, but it allows an actual print function to occur instead of just a PDF generation.
And a minor FYI, Web Forms generation from PowerBuilder has been around since version 11.0. That's about the time I started using it, which is how I came up with these options. (These things take time for me.)
Good luck,
Terry.