private TagsData extractTags(PdfDocumentInfo info) { string[] tags = separate(info.GetKeywords()); if (tags.Length == 0) { return(null); } TagsData result = _metaDataFactory.CreateNew(MetaDataType.Tags) as TagsData; foreach (string tag in tags) { result.AddTag(new Tag(Guid.NewGuid(), tag)); } 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; }