本文整理汇总了C#中PdfName类的典型用法代码示例。如果您正苦于以下问题:C# PdfName类的具体用法?C# PdfName怎么用?C# PdfName使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PdfName类属于命名空间,在下文中一共展示了PdfName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MarkedContentPoint
public MarkedContentPoint(
PdfName tag,
PdfDirectObject properties
)
: base(tag, properties)
{
}
示例2: DeviceColorSpace
protected DeviceColorSpace(
Document context,
PdfName baseDataObject
)
: base(context, baseDataObject)
{
}
示例3: PdfXObject
public PdfXObject(byte[] objectData, PdfName name, PdfObjectId objectId)
: base(objectId)
{
this.objectData = objectData;
this.name = name;
dictionary[PdfName.Names.Type] = PdfName.Names.XObject;
}
示例4: NamedAction
/**
<summary>Creates a new action within the given document context.</summary>
*/
public NamedAction(
Document context,
PdfName actionName
)
: base(context, PdfName.Named)
{
BaseDataObject[PdfName.N] = actionName;
}
示例5: Markup
protected Markup(
Page page,
PdfName subtype,
RectangleF box,
string text
)
: base(page, subtype, box, text)
{
}
示例6: Shape
protected Shape(
Page page,
RectangleF box,
string text,
PdfName subtype
)
: base(page, subtype, box, text)
{
}
示例7: LayerEntity
protected LayerEntity(
Document context,
PdfName typeName
)
: base(context,
new PdfDictionary(
new PdfName[]
{PdfName.Type},
new PdfDirectObject[]
{typeName}
))
{
}
示例8: Get
public static ListModeEnum Get(
PdfName name
)
{
if(name == null)
return ListModeEnum.AllPages;
ListModeEnum? listMode = codes.GetKey(name);
if(!listMode.HasValue)
throw new NotSupportedException("List mode unknown: " + name);
return listMode.Value;
}
示例9: Get
/**
<summary>Gets a specific filter object.</summary>
<param name="name">Name of the requested filter.</param>
<returns>Filter object associated to the name.</returns>
*/
public static Filter Get(
PdfName name
)
{
/*
NOTE: This is a factory singleton method for any filter-derived object.
*/
if(name == null)
return null;
if(name.Equals(PdfName.FlateDecode)
|| name.Equals(PdfName.Fl))
return FlateDecode;
else if(name.Equals(PdfName.LZWDecode)
|| name.Equals(PdfName.LZW))
throw new NotImplementedException("LZWDecode");
else if(name.Equals(PdfName.ASCIIHexDecode)
|| name.Equals(PdfName.AHx))
throw new NotImplementedException("ASCIIHexDecode");
else if(name.Equals(PdfName.ASCII85Decode)
|| name.Equals(PdfName.A85))
return ASCII85Filter;
else if(name.Equals(PdfName.RunLengthDecode)
|| name.Equals(PdfName.RL))
throw new NotImplementedException("RunLengthDecode");
else if(name.Equals(PdfName.CCITTFaxDecode)
|| name.Equals(PdfName.CCF))
throw new NotImplementedException("CCITTFaxDecode");
else if(name.Equals(PdfName.JBIG2Decode))
throw new NotImplementedException("JBIG2Decode");
else if(name.Equals(PdfName.DCTDecode)
|| name.Equals(PdfName.DCT))
throw new NotImplementedException("DCTDecode");
else if(name.Equals(PdfName.JPXDecode))
throw new NotImplementedException("JPXDecode");
else if(name.Equals(PdfName.Crypt))
throw new NotImplementedException("Crypt");
return null;
}
示例10: Get
/**
* Returns an entry from the image dictionary.
* @param key a key
* @return the value
*/
virtual public PdfObject Get(PdfName key) {
return dictionary.Get(key);
}
示例11: SetScript
/**
<summary>Sets the Javascript script into the specified base data object.</summary>
*/
internal static void SetScript(
PdfDictionary baseDataObject,
PdfName key,
string value
)
{
PdfDataObject scriptObject = baseDataObject.Resolve(key);
if(!(scriptObject is PdfStream) && value.Length > 256)
{baseDataObject[key] = baseDataObject.File.Register(scriptObject = new PdfStream());}
// Insert the script!
if(scriptObject is PdfStream)
{
bytes::IBuffer scriptBuffer = ((PdfStream)scriptObject).Body;
scriptBuffer.SetLength(0);
scriptBuffer.Append(value);
}
else
{baseDataObject[key] = new PdfTextString(value);}
}
示例12: ToHighlightModeEnum
/**
<summary>Gets the highlighting mode corresponding to the given value.</summary>
*/
private static HighlightModeEnum ToHighlightModeEnum(
PdfName value
)
{
foreach(KeyValuePair<HighlightModeEnum,PdfName> mode in HighlightModeEnumCodes)
{
if(mode.Value.Equals(value))
return mode.Key;
}
return HighlightModeEnum.Invert;
}
示例13: SetPath
/**
<see cref="GetPath(PdfName)"/>
*/
private void SetPath(
PdfName key,
string value
)
{
BaseDictionary[key] = new PdfString(value);
}
示例14: SetDependencies
/**
<see cref="GetDependencies(PdfName)"/>
*/
private void SetDependencies(
PdfName key,
RelatedFiles value
)
{
PdfDictionary dependenciesObject = (PdfDictionary)BaseDictionary[PdfName.RF];
if(dependenciesObject == null)
{BaseDictionary[PdfName.RF] = dependenciesObject = new PdfDictionary();}
dependenciesObject[key] = value.BaseObject;
}
示例15: GetEmbeddedFile
/**
<summary>Gets the embedded file associated to the given key.</summary>
*/
private EmbeddedFile GetEmbeddedFile(
PdfName key
)
{
PdfDictionary embeddedFilesObject = (PdfDictionary)BaseDictionary[PdfName.EF];
if(embeddedFilesObject == null)
return null;
return EmbeddedFile.Wrap(embeddedFilesObject[key]);
}