|
Foxit PDF SDK
|
Public 类型 | |
| enum | PrintScale { e_PrintScaleNone = 0, e_PrintScaleAppDefault = 1 } |
| 页面缩放选项的枚举。 更多... | |
| enum | ViewerPref { e_HideToolbar = 0, e_HideMenubar = 1, e_HideWindowUI = 2, e_FitWindow = 3, e_CenterWindow = 4, e_DisplayDocTitle = 5 } |
| 文档打开时各种GUI元素应如何表现的枚举。 更多... | |
Public 成员函数 | |
| DocViewerPrefs (const PDFDoc &document, objects::PDFDictionary *pdf_dict=0) | |
| 带参数的构造函数。 更多... | |
| DocViewerPrefs (const DocViewerPrefs &other) | |
| 拷贝构造函数。 更多... | |
| ~DocViewerPrefs () | |
| 析构函数。 | |
| objects::PDFDictionary * | GetDict () const |
| 从当前对象获取PDF字典。 更多... | |
| PDFDoc::DisplayMode | GetNonFullScreenPageMode () const |
| 获取指定文档在退出全屏模式时如何显示文档的显示模式, 当文档的显示模式为全屏时。 更多... | |
| PDFPage::BoxType | GetPrintArea () |
| 获取表示打印文档时要渲染的页面区域的页面边界。 更多... | |
| PDFPage::BoxType | GetPrintClip () |
| 获取打印文档时页面内容要被裁剪的页面边界。 更多... | |
| int | GetPrintCopies () const |
| 获取为PDF文档打开打印对话框时要打印的副本数量。 更多... | |
| common::Range | GetPrintRange () const |
| 获取用于在为PDF文档打开打印对话框时初始化打印对话框的页面范围信息。 更多... | |
| PrintScale | GetPrintScale () const |
| 获取为PDF文档显示打印对话框时要选择的页面缩放选项。 更多... | |
| bool | GetReadingDirection () const |
| 获取文本的主要阅读方向。 更多... | |
| bool | GetUIDisplayStatus (ViewerPref pref) const |
| 获取指定查看器首选项类型的UI显示状态。 更多... | |
| PDFPage::BoxType | GetViewArea () |
| 获取表示在屏幕上查看文档时要显示的页面区域的页面边界。 更多... | |
| PDFPage::BoxType | GetViewClip () |
| 获取在屏幕上查看文档时页面内容要被裁剪的页面边界。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| bool | operator != (const DocViewerPrefs &other) const |
| 不等于运算符。 更多... | |
| DocViewerPrefs & | operator= (const DocViewerPrefs &other) |
| 赋值运算符。 更多... | |
| bool | operator== (const DocViewerPrefs &other) const |
| 等于运算符。 更多... | |
| void | SetNonFullScreenPageMode (PDFDoc::DisplayMode display_mode) |
| 设置指定文档在退出全屏模式时如何显示文档的显示模式, 当文档的显示模式为全屏时。 更多... | |
| void | SetPrintArea (PDFPage::BoxType box_type) |
| 设置表示打印文档时要渲染的页面区域的页面边界。 更多... | |
| void | SetPrintClip (PDFPage::BoxType box_type) |
| 设置打印文档时页面内容要被裁剪的页面边界。 更多... | |
| void | SetPrintCopies (int print_copies) |
| 设置为PDF文档打开打印对话框时要打印的副本数量。 更多... | |
| void | SetPrintRange (const common::Range &page_range) |
| 设置用于在为PDF文档打开打印对话框时初始化打印对话框的页面范围。 更多... | |
| void | SetPrintScale (PrintScale print_scale) |
| 设置为PDF文档显示打印对话框时要选择的页面缩放选项。 更多... | |
| void | SetReadingDirection (bool is_left_to_right) |
| 设置文本的主要阅读方向。 更多... | |
| void | SetUIDisplayStatus (ViewerPref pref, bool value) |
| 设置指定查看器首选项类型的UI显示状态。 更多... | |
| void | SetViewArea (PDFPage::BoxType box_type) |
| 设置表示在屏幕上查看文档时要显示的页面区域的页面边界。 更多... | |
| void | SetViewClip (PDFPage::BoxType box_type) |
| 设置在屏幕上查看文档时页面内容要被裁剪的页面边界。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
查看器首选项定义了文档在屏幕上或打印时的呈现方式。 此类应由有效的PDF文档对象构造。此类提供了获取/设置PDF文档查看器首选项 不同部分的功能,如UI可见性、非全屏模式的显示模式、阅读方向、 指定用途的框项目类型、用于打印的一些首选项选项等。
文档打开时各种GUI元素应如何表现的枚举。
此枚举的值应单独使用。
|
explicit |
带参数的构造函数。
当输入参数pdf_dict为NULL时,Foxit PDF SDK将尝试 访问指定PDF文档中的查看器首选项信息: 如果PDF文档中存在查看器首选项信息,此函数只是构造一个 与这些信息关联的文档查看器首选项对象; 如果指定的PDF文档中没有此类信息,构造的文档查看器首选项对象 可用于向PDF文档设置这些信息。
| [in] | document | 有效的PDF文档对象。 |
| [in] | pdf_dict | 表示PDF文档查看器首选项信息的PDF字典。 如果此参数不是NULL,此PDF字典应已存在于 指定的PDF文档中。如果此参数为NULL,则表示 访问指定PDF文档中的查看器首选项信息。 请参考"详细信息"部分了解更多详情。默认值:NULL。 |
| foxit::pdf::DocViewerPrefs::DocViewerPrefs | ( | const DocViewerPrefs & | other | ) |
拷贝构造函数。
| [in] | other | 另一个文档查看器首选项对象。 |
| objects::PDFDictionary* foxit::pdf::DocViewerPrefs::GetDict | ( | ) | const |
从当前对象获取PDF字典。
| PDFDoc::DisplayMode foxit::pdf::DocViewerPrefs::GetNonFullScreenPageMode | ( | ) | const |
获取指定文档在退出全屏模式时如何显示文档的显示模式, 当文档的显示模式为全屏时。
此显示模式仅在文档的显示模式为全屏时有用。 可以使用函数 PDFDoc::GetDisplayMode 检查文档的显示模式。
| PDFPage::BoxType foxit::pdf::DocViewerPrefs::GetPrintArea | ( | ) |
获取表示打印文档时要渲染的页面区域的页面边界。
| PDFPage::BoxType foxit::pdf::DocViewerPrefs::GetPrintClip | ( | ) |
获取打印文档时页面内容要被裁剪的页面边界。
| int foxit::pdf::DocViewerPrefs::GetPrintCopies | ( | ) | const |
获取为PDF文档打开打印对话框时要打印的副本数量。
| common::Range foxit::pdf::DocViewerPrefs::GetPrintRange | ( | ) | const |
获取用于在为PDF文档打开打印对话框时初始化打印对话框的页面范围信息。
页面范围中指定的所有索引都是从0到(页面数 - 1)。 如果页面范围信息无效,此函数将抛出异常 foxit::e_ErrFormat。
| PrintScale foxit::pdf::DocViewerPrefs::GetPrintScale | ( | ) | const |
获取为PDF文档显示打印对话框时要选择的页面缩放选项。
| bool foxit::pdf::DocViewerPrefs::GetReadingDirection | ( | ) | const |
获取文本的主要阅读方向。
阅读方向信息对文档内容或页码编号没有直接影响, 但可用于确定页面并排显示或多页打印(即在单页上打印多个PDF页面)时 页面的相对位置。
| bool foxit::pdf::DocViewerPrefs::GetUIDisplayStatus | ( | ViewerPref | pref | ) | const |
获取指定查看器首选项类型的UI显示状态。
| [in] | pref | 查看器首选项类型。请参考从 DocViewerPrefs::e_HideToolbar 开始的值,应该是这些值中的一个。 |
| PDFPage::BoxType foxit::pdf::DocViewerPrefs::GetViewArea | ( | ) |
获取表示在屏幕上查看文档时要显示的页面区域的页面边界。
| PDFPage::BoxType foxit::pdf::DocViewerPrefs::GetViewClip | ( | ) |
获取在屏幕上查看文档时页面内容要被裁剪的页面边界。
| bool foxit::pdf::DocViewerPrefs::IsEmpty | ( | ) | const |
检查当前对象是否为空。
当当前对象为空时,表示当前对象无用。
| bool foxit::pdf::DocViewerPrefs::operator != | ( | const DocViewerPrefs & | other | ) | const |
不等于运算符。
| [in] | other | 另一个文档查看器首选项对象。此函数将检查当前对象是否不等于这个对象。 |
| DocViewerPrefs& foxit::pdf::DocViewerPrefs::operator= | ( | const DocViewerPrefs & | other | ) |
赋值运算符。
| [in] | other | 另一个文档查看器首选项对象,其值将被赋给当前对象。 |
| bool foxit::pdf::DocViewerPrefs::operator== | ( | const DocViewerPrefs & | other | ) | const |
等于运算符。
| [in] | other | 另一个文档查看器首选项对象。此函数将检查当前对象是否等于这个对象。 |
| void foxit::pdf::DocViewerPrefs::SetNonFullScreenPageMode | ( | PDFDoc::DisplayMode | display_mode | ) |
设置指定文档在退出全屏模式时如何显示文档的显示模式, 当文档的显示模式为全屏时。
此显示模式仅在文档的显示模式为全屏时有用。 可以使用函数 PDFDoc::GetDisplayMode 检查文档的显示模式。
| [in] | display_mode | 退出全屏模式时的新显示模式。应该是以下值之一: |
| void foxit::pdf::DocViewerPrefs::SetPrintArea | ( | PDFPage::BoxType | box_type | ) |
| void foxit::pdf::DocViewerPrefs::SetPrintClip | ( | PDFPage::BoxType | box_type | ) |
| void foxit::pdf::DocViewerPrefs::SetPrintCopies | ( | int | print_copies | ) |
设置为PDF文档打开打印对话框时要打印的副本数量。
| [in] | print_copies | 副本数量的新整数值。有效范围:从1到5。 如果输入值超出有效范围,Foxit PDF SDK将默认使用1。 |
| void foxit::pdf::DocViewerPrefs::SetPrintRange | ( | const common::Range & | page_range | ) |
设置用于在为PDF文档打开打印对话框时初始化打印对话框的页面范围。
| [in] | page_range | 表示新页面范围信息的范围对象。它应该包含至少 一个有效的范围段。此范围指定的所有索引应该 从0到(页面数 - 1)。页面数由函数 PDFDoc::GetPageCount 返回。 |
| void foxit::pdf::DocViewerPrefs::SetPrintScale | ( | PrintScale | print_scale | ) |
设置为PDF文档显示打印对话框时要选择的页面缩放选项。
| [in] | print_scale | 新的页面缩放选项字符串。请参考从 DocViewerPrefs::e_PrintScaleNone 开始的值,应该是这些值中的一个。 |
| void foxit::pdf::DocViewerPrefs::SetReadingDirection | ( | bool | is_left_to_right | ) |
设置文本的主要阅读方向。
阅读方向信息对文档内容或页码编号没有直接影响, 但可用于确定页面并排显示或多页打印(即在单页上打印多个PDF页面)时 页面的相对位置。
| [in] | is_left_to_right | 新的阅读方向:true表示从左到右的阅读顺序, false表示从右到左的阅读顺序。 |
| void foxit::pdf::DocViewerPrefs::SetUIDisplayStatus | ( | ViewerPref | pref, |
| bool | value | ||
| ) |
设置指定查看器首选项类型的UI显示状态。
如果查看器首选项类型之前不存在且从未设置过, 该值默认为false。
| [in] | pref | 查看器首选项类型。请参考从 DocViewerPrefs::e_HideToolbar 开始的值,应该是这些值中的一个。 |
| [in] | value | 指定查看器首选项类型的新值。 |
| void foxit::pdf::DocViewerPrefs::SetViewArea | ( | PDFPage::BoxType | box_type | ) |
| void foxit::pdf::DocViewerPrefs::SetViewClip | ( | PDFPage::BoxType | box_type | ) |