.net 打印对话框

发布于 2024-08-28 04:36:33 字数 260 浏览 5 评论 0原文

我正在构建一个允许用户浏览文件的按钮。我想获取文件的位置并将其发送到 printdialog。这可以做到吗?如果可以的话怎么做?

我知道如何创建浏览功能以及如何获取位置...

我的问题是如何将文件的位置发送到 printdialog 进行打印...没有 打开文件

我的目标是打印为 pdf...

所以如果我可以将 .doc 转换为 pdf 而无需 printdialog 那将是最好的 用户将浏览到一个文件并将其转换为 pdf 到静态目的地

i am building a button that allows a user to browse to a file. i want to get the location of the file and send it to printdialog. can this be done and if so how?

i know how to create the browse funcitonality and how to get the location...

my question is how to send the location of the file to the printdialog for printing...without
opening the file

my goal is to print to pdf...

so if i can convert the .doc to pdf without printdialog that would be the best
a user will browse to a file and convert it to pdf to a static destination

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱殇璃 2024-09-04 04:36:33

好消息是您不必打开该文件。坏消息是,如果您想要将 .doc 文件转换为 PDF,那么您要么需要一个组件来为您完成这项工作,要么需要使用 Microsoft Word 进行 COM 自动化(使用另存为 PDF 插件)中)

DOC 到 PDF 库(不一定免费)

也可以在您的应用程序中使用 Web 浏览器并告诉它打印到默认打印机(PDF 打印机 - 很多免费打印机),但如果您要做很​​多这样的事情,那么找到一个组件来执行此操作直接是你最好的选择;尽管质量可能是也可能不是您在生成的 PDF 文档中寻找的质量。

The good news is that you don't have to open the file. The bad news is that if you're wanting to convert .doc files to PDF then you'll either need a component to do the work for you or you will need to do COM automation with Microsoft Word (with the Save as PDF Plug-in)

DOC to PDF library (not necessarily free)

It could also be possible to use a web browser in your application and tell it to print to a default printer (PDF printer -- lots of free ones) but if you're going to do a lot of these then finding a component to do this directly is your best bet; although quality may or may not be what you're looking for in the resulting PDF document.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文