1
This page给出了一个有用的示例,说明如何为PDF设置自定义文档属性。如何使用ABCpdf检索自定义文档属性?
所以我做这个(我已经验证了自定义属性在文件中设置):
Doc theDoc = new Doc();
int theID = theDoc.AddObject("<< >>");
theDoc.SetInfo(-1, "/Info:Ref", theID.ToString());
theDoc.SetInfo(theID, "/Company:Text", "ACME");
theDoc.Save(FileName);
我试图找回在稍后的时间。我已经试过:
Doc theDoc = new Doc();
theDoc.Read(FileName);
int theID = theDoc.AddObject("<< >>");
theDoc.SetInfo(-1, "/Info:Ref", theID.ToString());
return theDoc.GetInfo(theID, "/Company:Text"); //returns empty string
和
//...read theDoc
int theID = theDoc.GetInfoInt(-1, "/Info");
return theDoc.GetInfo(theID, "/Company:Text"); //returns empty string
任何人有一个线索,我怎么能检索的财产?