/// <summary> /// Writes document information like author and subject to the PDF document. /// </summary> public void WriteDocumentInformation() { if (!_document.IsNull("Info")) { DocumentInfo docInfo = _document.Info; PdfDocumentInformation pdfInfo = _pdfDocument.Info; if (!docInfo.IsNull("Author")) { pdfInfo.Author = docInfo.Author; } if (!docInfo.IsNull("Keywords")) { pdfInfo.Keywords = docInfo.Keywords; } if (!docInfo.IsNull("Subject")) { pdfInfo.Subject = docInfo.Subject; } if (!docInfo.IsNull("Title")) { pdfInfo.Title = docInfo.Title; } } }
/// <summary> /// Writes document information like author and subject to the PDF document. /// </summary> public void WriteDocumentInformation() //!!!modTHHO 15.08.2006 { if (!this.document.IsNull("Info")) { DocumentInfo docInfo = this.document.Info; PdfDocumentInformation pdfInfo = this.pdfDocument.Info; if (!docInfo.IsNull("Author")) { pdfInfo.Author = docInfo.Author; } if (!docInfo.IsNull("Keywords")) { pdfInfo.Keywords = docInfo.Keywords; } if (!docInfo.IsNull("Subject")) { pdfInfo.Subject = docInfo.Subject; } if (!docInfo.IsNull("Title")) { pdfInfo.Title = docInfo.Title; } } }
/// <summary> /// Renders the document information of title, author etc.. /// </summary> private void RenderInfo() { if (_document.IsNull("Info")) { return; } _rtfWriter.StartContent(); _rtfWriter.WriteControl("f", 2); // Second font is Courier New. See Prepare(). _rtfWriter.WriteControl("info"); DocumentInfo info = _document.Info; if (!info.IsNull("Title")) { _rtfWriter.StartContent(); _rtfWriter.WriteControl("title"); _rtfWriter.WriteText(info.Title); _rtfWriter.EndContent(); } if (!info.IsNull("Subject")) { _rtfWriter.StartContent(); _rtfWriter.WriteControl("subject"); _rtfWriter.WriteText(info.Subject); _rtfWriter.EndContent(); } if (!info.IsNull("Author")) { _rtfWriter.StartContent(); _rtfWriter.WriteControl("author"); _rtfWriter.WriteText(info.Author); _rtfWriter.EndContent(); } if (!info.IsNull("Keywords")) { _rtfWriter.StartContent(); _rtfWriter.WriteControl("keywords"); _rtfWriter.WriteText(info.Keywords); _rtfWriter.EndContent(); } _rtfWriter.EndContent(); }
/// <summary> /// Renders the document information of title, author etc.. /// </summary> private void RenderInfo() { if (document.IsNull("Info")) { return; } this.rtfWriter.StartContent(); this.rtfWriter.WriteControl("info"); DocumentInfo info = this.document.Info; if (!info.IsNull("Title")) { this.rtfWriter.StartContent(); this.rtfWriter.WriteControl("title"); this.rtfWriter.WriteText(info.Title); this.rtfWriter.EndContent(); } if (!info.IsNull("Subject")) { this.rtfWriter.StartContent(); this.rtfWriter.WriteControl("subject"); this.rtfWriter.WriteText(info.Subject); this.rtfWriter.EndContent(); } if (!info.IsNull("Author")) { this.rtfWriter.StartContent(); this.rtfWriter.WriteControl("author"); this.rtfWriter.WriteText(info.Author); this.rtfWriter.EndContent(); } if (!info.IsNull("Keywords")) { this.rtfWriter.StartContent(); this.rtfWriter.WriteControl("keywords"); this.rtfWriter.WriteText(info.Keywords); this.rtfWriter.EndContent(); } this.rtfWriter.EndContent(); }