📄 optionalcontentgroup.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using AnotherPDFLib.PdfGraphics;
namespace AnotherPDFLib
{
/// <summary>
/// An optional content group is a dictionary representing a collection of graphics
/// that can be made visible or invisible dynamically by users of viewer applications.
/// The graphics belonging to such a group can reside anywhere in the document:
/// they need not be consecutive in drawing order, nor even belong to the same content
/// stream.
/// </summary>
public partial class OptionalContentGroup : PdfDictionary
{
public OptionalContentGroup() : base("OCG")
{
}
/// <summary>
/// The name of the optional content group, suitable for presentation in
/// a viewer application's 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>
/// A single intent name that indicate the intended use of the graphics in the group.
/// Default value: View.
/// </summary>
public string Intent
{
get
{
PdfName intent = this["Intent"] as PdfName;
if (intent != null)
{
return intent.Value;
}
return String.Empty;
}
set
{
this["Intent"] = new PdfName(value);
}
}
/// <summary>
/// An array containing any combination of names.
/// PDF 1.5 defines two names, View and Design, that indicate the intended
/// use of the graphics in the group. Future versions may define others.
/// A processing application can choose to use only groups that have a specific intent
/// and ignore others.
/// </summary>
public PdfArray Intents
{
get
{
return this["Intent"] as PdfArray;
}
set
{
this["Intent"] = value;
}
}
/// <summary>
/// A usage dictionary describing the nature of the content controlled by the group.
/// It may be used by features that automatically control the state of the group
/// based on outside factors.
/// </summary>
public OptionalContentUsage Usage
{
get
{
return this["Usage"] as OptionalContentUsage;
}
set
{
this["Usage"] = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -