我正在使用的PdfDictionary
並寫入以下錯誤與使用PdfDictionary
PdfDictionary sv = new PdfDictionary();
sv["/Type"] = new PDFName("/SV");
sv["/Filter"] = new PDFName("Abc");
sv["/Ff"] = new PDFNumber(1);
signame.Dictionary["/SV"] = sv;
PDFArray arReasons = new PDFArray();
arReasons.Add(new PDFString(string.Format("CToken::{0}", customxml)));
arReasons.Add(new PDFString(reason));
v.Put(PdfName.arReasons);
但它給了我下面的錯誤搜索了很多,但沒有取得積極成果
Error 1 Cannot apply indexing with [] to an expression of type 'iTextSharp.text.pdf.PdfDictionary' C:\Users\lenovo\Dropbox\updated C# app\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs 134 17 WindowsFormsApplication1
其他的錯誤,我得到的是: -
Error 9 'iTextSharp.text.pdf.PdfName' does not contain a definition for 'arReasons' C:\Users\lenovo\Dropbox\updated C# app\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs 145 32 WindowsFormsApplication1
Error 3 'string' does not contain a definition for 'Dictionary' and no extension method 'Dictionary' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) C:\Users\lenovo\Dropbox\updated C# app\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs 141 25 WindowsFormsApplication1
Error 8 The name 'reason' does not exist in the current context C:\Users\lenovo\Dropbox\updated C# app\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs 144 45 WindowsFormsApplication1
以防萬一有人幫我也
看起來像PdfDictionary類不支持索引,因爲它不公開任何數組類型的行爲。 – ryadavilli
看起來像任何可能的工作 – user1862352