/// <summary> /// Overrides the base implementation to output the document /// </summary> /// <param name="context"></param> /// <param name="writer"></param> /// <returns></returns> protected override PDFObjectRef DoOutputToPDF(PDFRenderContext context, PDFWriter writer) { context.TraceLog.Begin(TraceLevel.Message, "Layout Document", "Outputting document to the PDFWriter"); writer.OpenDocument(); PDFObjectRef catalog = this.WriteCatalog(context, writer); this.WriteInfo(context, writer); PDFDocumentID id = this.DocumentComponent.DocumentID; if (null == id) { id = PDFDocumentID.Create(); } writer.CloseDocument(id); context.TraceLog.End(TraceLevel.Message, "Layout Document", "Completed output of the document to the PDFWriter"); return(catalog); }
protected override PDFObjectRef DoOutputToPDF(PDFRenderContext context, PDFWriter writer) { if (null != this.OriginalFile) { writer.OpenDocument(this.OriginalFile, true); PDFObjectRef catalog = this.WriteCatalog(context, writer); this.WriteInfo(context, writer); PDFDocumentID id = this.DocumentComponent.DocumentID; if (null == id) { id = PDFDocumentID.Create(); } writer.CloseDocument(id); return(catalog); } else { return(base.DoOutputToPDF(context, writer)); } }