如何使用iTextSharp覆盖PDF打印对话框设置 [英] How can I override PDF print dialog settings with iTextSharp

查看:211
本文介绍了如何使用iTextSharp覆盖PDF打印对话框设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何使用iTextSharp覆盖pdf打印对话框中的页面方向选择。

Can any one tell me how to override page orientation selection in pdf print dialog using iTextSharp.

我使用这些线来覆盖缩放和选择纸张来源 PDF页面大小

I am using these lines to override scaling and "Choose paper source by PDF page size"

writer.AddViewerPreference(PdfName.PRINTSCALING,PdfName.NONE);
writer.AddViewerPreference(PdfName.PICKTRAYBYPDFSIZE, PdfBoolean.PDFFALSE);


推荐答案

请查看标题为查看器中的条目的表150首选项字典,在ISO-32000-1中(您可以从Adobe网站下载副本)。它包含您可以在PDF文档中定义的所有查看器首选项,包括 PrintScaling PickTrayByPDFSize ,但您将找不到任何覆盖页面方向选择的设置。

Please check table 150, entitled "Entries in a viewer preferences dictionary", in ISO-32000-1 (you can download a copy from the Adobe web site). It contains all the viewer preferences you can define in a PDF document, including PrintScaling and PickTrayByPDFSize, but you won't find any setting to override the page orientation selection.

换句话说:你问的是PDF规范中没有定义的东西,因此,它没有在任何PDF库中实现(至于我知道。)

In other words: you're asking something that isn't defined in the PDF specification, and as a result, it isn't implemented in any PDF library (as far as I know).

这篇关于如何使用iTextSharp覆盖PDF打印对话框设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆