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
任何人有一個線索,我怎麼能檢索的財產?