WPF 中的页面首选项对话框

发布于 2024-07-20 13:45:50 字数 357 浏览 6 评论 0原文

我正在尝试添加从我正在开发的程序输出到 PDF 和 XPS 的功能。 最初两者都是通过打印机(pdf 打印机/xps 编写器)完成的,但我想更直接地完成。

我遇到的问题是 WPF 似乎没有页面首选项对话框。 是否有一个但我找不到它,或者类似的东西必须在 WPF 中自定义构建吗?

我可以显示打印对话框,然后实际上不调用 PrintDialog.Print,但这并不比让用户使用 PDF 打印机进行打印更好。 我可以从打印对话框中检索所有页面设置,但用户实际上会为当前选择的任何打印机设置这些设置。

我只需要一个包含所有标准打印机首选项选项的对话框,例如页面大小、边距、副本等。创建起来并不困难,但令我惊讶的是我找不到......

I'm fiddling with adding the ability to output from a program I'm working on to both PDF and XPS. Initially both were just done via printers (pdf printer/xps writer) but I'd like to do it a little more directly.

The issue I've run into is that there doesn't seem to be a page preferences dialog for WPF. Is there one and I just can't find it, or does something like this have to be custom built in WPF?

I can display the print dialog and then just not actually call PrintDialog.Print, but that's not really any better than just having the user print using a PDF printer. I can retrieve all the page settings from the print dialog, but the user would actually be setting those settings for whichever printer was currently selected.

I just need a dialog with all the standard printer preference options, like page size, margins, copies, etc. Not difficult to create, but I'm surprised I can't find one...

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

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

发布评论

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

评论(1

只涨不跌 2024-07-27 13:45:50

我对的回答这个问题应该对你有帮助。 有什么机会...我刚刚回答了它,我偶然发现了你的问题:)

希望这对你有帮助!

My answer to this question should help you. What are the chances... I just answered it, and I stumble across your question :)

Hope this helps you!!

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