private TitleData extractTitle(PdfDocumentInfo info) { string title = info.GetTitle(); if (string.IsNullOrEmpty(title)) { return(null); } TitleData result = _metaDataFactory.CreateNew(MetaDataType.Title) as TitleData; result.Content = title; 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; }