当前位置: 首页>>代码示例>>C#>>正文


C# PdfDictionary.Get方法代码示例

本文整理汇总了C#中PdfDictionary.Get方法的典型用法代码示例。如果您正苦于以下问题:C# PdfDictionary.Get方法的具体用法?C# PdfDictionary.Get怎么用?C# PdfDictionary.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PdfDictionary的用法示例。


在下文中一共展示了PdfDictionary.Get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckEmbeddedFile

 protected override void CheckEmbeddedFile(PdfDictionary embeddedFile)
 {
     PdfObject _params = GetDirectObject(embeddedFile.Get(PdfName.PARAMS));
     if (_params == null) {
         throw new PdfAConformanceException(embeddedFile,
             MessageLocalization.GetComposedMessage("embedded.file.shall.contain.valid.params.key"));
     } else if (_params.IsDictionary()) {
         PdfObject modDate = ((PdfDictionary) _params).Get(PdfName.MODDATE);
         if (modDate == null || !(modDate is PdfString)) {
             throw new PdfAConformanceException(embeddedFile,
                 MessageLocalization.GetComposedMessage("embedded.file.shall.contain.params.key.with.valid.moddate.key"));
         }
     }
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:14,代码来源:PdfA3Checker.cs

示例2: CleverPdfDictionaryClone

        private PdfObject CleverPdfDictionaryClone(PdfDictionary dict) {
            PdfDictionary newDict;
            if (dict.IsStream()) {
                newDict = new PdfStream(emptyByteArray);
                newDict.Remove(PdfName.LENGTH);
            }
            else
                newDict = new PdfDictionary();

            foreach (PdfName key in dict.Keys)
                if (keysForCheck.Contains(key))
                    newDict.Put(key, dict.Get(key));

            return newDict;
        }
开发者ID:Niladri24dutta,项目名称:itextsharp,代码行数:15,代码来源:PdfAChecker.cs

示例3: InspectChildDictionary

        /**
         * If the child of a structured element is a dictionary, we inspect the
         * child; we may also draw a tag.
         * 
         * @param k
         *            the child dictionary to inspect
         */
        virtual public void InspectChildDictionary(PdfDictionary k, bool inspectAttributes) {
            if (k == null)
                return;
            PdfName s = k.GetAsName(PdfName.S);
            if (s != null) {
                String tagN = PdfName.DecodeName(s.ToString());
			    String tag = FixTagName(tagN);
                outp.Write("<");
                outp.Write(tag);
                if (inspectAttributes) {
                    PdfDictionary a = k.GetAsDict(PdfName.A);
                    if (a != null) {
                        Dictionary<PdfName, PdfObject>.KeyCollection keys = a.Keys;
                        foreach (PdfName key in keys) {
                            outp.Write(' ');
                            PdfObject value = a.Get(key);
                            value = PdfReader.GetPdfObject(value);
                            outp.Write(XmlName(key));
                            outp.Write("=\"");
                            outp.Write(value.ToString());
                            outp.Write("\"");
                        }
                    }
                }
                outp.Write(">");
                PdfObject alt = k.Get(PdfName.ALT);
                if (alt != null && alt.ToString() != null) {
                    outp.Write("<alt><![CDATA[");
                    outp.Write(Regex.Replace(alt.ToString(), "[\\000]*", ""));
                    outp.Write("]]></alt>");
                }
                PdfDictionary dict = k.GetAsDict(PdfName.PG);
                if (dict != null)
                    ParseTag(tagN, k.GetDirectObject(PdfName.K), dict);
                InspectChild(k.GetDirectObject(PdfName.K));
                outp.Write("</");
                outp.Write(tag);
                outp.WriteLine(">");
            } else
                InspectChild(k.GetDirectObject(PdfName.K));
        }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:48,代码来源:TaggedPdfReaderTool.cs


注:本文中的PdfDictionary.Get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。