⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 optionalcontentconfiguration.cs

📁 PDF文档生成解析使用的库,可以用来改写自己的文档格式
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using AnotherPDFLib.PdfGraphics;

namespace AnotherPDFLib
{
	/// <summary>
	/// Configuration dictionaries represent
	/// different presentations of a document's optional content groups for use by
	/// PDF processing applications or features.
	/// </summary>
	public partial class OptionalContentConfiguration : PdfDictionary
	{
		/// <summary>
		/// A name for the configuration,
		/// suitable for presentation in a user interface.
		/// </summary>
		public string Name
		{
			get
			{
				PdfString name = this["Name"] as PdfString;
				if (name != null)
				{
					return name.Value;
				}
				return String.Empty;
			}
			set
			{
				this["Name"] = new PdfString(value);
			}
		}

		/// <summary>
		/// Name of the application or feature that
		/// created this configuration dictionary.
		/// </summary>
		public string Creator
		{
			get
			{
				PdfString creator = this["Creator"] as PdfString;
				if (creator != null)
				{
					return creator.Value;
				}
				return String.Empty;
			}
			set
			{
				this["Creator"] = new PdfString(value);
			}
		}

		/// <summary>
		/// Used to initialize the states of all the optional content groups in a
		/// document when this configuration is applied.
		/// The value of this entry must
		/// be one of the following names:
		/// ON: The states of all groups are turned ON.
		/// OFF: The states of all groups are turned OFF.
		/// Unchanged: The states of all groups are left unchanged.
		/// After this initialization, the contents of the ON and OFF arrays are processed,
		/// overriding the state of the groups included in the arrays.
		/// Default value: ON.
		/// </summary>
		public string BaseState
		{
			get
			{
				PdfName basestate = this["BaseState"] as PdfName;
				if (basestate != null)
				{
					return basestate.Value;
				}
				return String.Empty;
			}
			set
			{
				this["BaseState"] = new PdfName(value);
			}
		}

		/// <summary>
		/// An array of optional content groups whose state should be set to
		/// ON when this configuration is applied.
		/// Note: If the BaseState entry is ON, this entry is redundant.
		/// </summary>
		public PdfArray ON
		{
			get
			{
				PdfArray on = this["ON"] as PdfArray;
				if (on == null)
				{
					on = new PdfArray();
					this["ON"] = on;
				}
				return on;
			}
			set
			{
				this["ON"] = value;
			}
		}

		/// <summary>
		/// An array of optional content groups whose state should be set to
		/// OFF when this configuration is applied.
		/// Note: If the BaseState entry is OFF, this entry is redundant.
		/// </summary>
		public PdfArray OFF
		{
			get
			{
				PdfArray off = this["OFF"] as PdfArray;
				if (off == null)
				{
					off = new PdfArray();
					this["OFF"] = off;
				}
				return off;
			}
			set
			{
				this["OFF"] = value;
			}
		}

		/// <summary>
		/// An array of usage application dictionaries specifying
		/// which usage dictionary categories should be consulted
		/// by viewer applications to automatically set the states of optional content
		/// groups based on external factors, such as the current system language or
		/// viewing magnification, and when they should be applied.
		/// </summary>
		public PdfArray Usages
		{
			get
			{
				PdfArray usages = this["AS"] as PdfArray;
				if (usages == null)
				{
					usages = new PdfArray();
					this["AS"] = usages;
				}
				return usages;
			}
			set
			{
				this["AS"] = value;
			}
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -