/// <summary> /// Creates a new PDF exporter with the specified settings. /// </summary> /// <param name="report">The report object.</param> /// <param name="settings">The settings for the PDF exporter.</param> public PdfExporter(GcReport report, PdfExportSettings settings) : this(report) { if (settings != null) { this.settings.CopyFrom(settings); } }
/// <summary> /// Copies from other settings. /// </summary> /// <param name="settings">The settings</param> internal void CopyFrom(PdfExportSettings settings) { if (settings != null) { this.author = settings.author; this.title = settings.title; this.subject = settings.subject; this.keywords = settings.keywords; this.creator = settings.creator; this.centerWindow = settings.centerWindow; this.displayDocTitle = settings.displayDocTitle; this.hideMenubar = settings.hideMenubar; this.hideToolbar = settings.hideToolbar; this.hideWindowUI = settings.hideWindowUI; this.fitWindow = settings.fitWindow; this.pageLayout = settings.pageLayout; this.openType = settings.openType; this.pageDuration = settings.pageDuration; this.pageTransition = settings.pageTransition; this.destinationType = settings.destinationType; this.openPageNumber = settings.openPageNumber; this.printPreset.CopyFrom(settings.printPreset); this.documentAttachments.AddRange((IEnumerable <DocumentAttachment>)settings.documentAttachments); } }
/// <summary> /// Creates a new PDF exporter. /// </summary> /// <param name="report">The report object.</param> public PdfExporter(GcReport report) { this.dpi = (int)UnitManager.Dpi; this.settings = new PdfExportSettings(); this.imageCaches = new Dictionary <ImageSource, Image>(); if (report == null) { throw new ArgumentNullException("report"); } this.report = report; }