private AuthorData extractAuthors(PdfDocumentInfo info) { string[] authors = separate(info.GetAuthor()); if (authors.Length == 0) { return(null); } AuthorData result = _metaDataFactory.CreateNew(MetaDataType.Author) as AuthorData; foreach (string author in authors) { result.Add(new Author(Guid.NewGuid(), author)); } return(result); }
/**************************************************************************/ private void LoadMetadata() { this.Metadata.Add("title", ""); this.Metadata.Add("author", ""); this.Metadata.Add("description", ""); this.Metadata.Add("keywords", ""); if (this.Pdf != null) { PdfDocumentInfo pdfInfo = this.Pdf.GetDocumentInfo(); this.Metadata["title"] = pdfInfo.GetTitle(); this.Metadata["author"] = pdfInfo.GetAuthor(); this.Metadata["description"] = pdfInfo.GetSubject(); this.Metadata["keywords"] = pdfInfo.GetKeywords(); } return; }