diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs index 938cfcc9..53180a8f 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs @@ -642,6 +642,8 @@ namespace VEPROMS { string locpdfname = null; // get pdf file name for later merge code MyProcedure = myProc; + // C2020-002 paper size is now set in the format files - default is Letter + Volian.Print.Library.Rtf2Pdf.PaperSize = myProc.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize; if (myProc.Sections != null) { // This is master/slave & a slave has been selected for printing (SelectedSlave > 0) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index de9a285a..5328e0e2 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1096,8 +1096,9 @@ namespace VEPROMS } void displaySearch1_PrintRequest(object sender, DisplaySearchEventArgs args) { + // C2020-002 paper size is now set in the format files - default is Letter, pass this PDFReport Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.TypesSelected, args.MyItemInfoList, - Volian.Base.Library.VlnSettings.TemporaryFolder + @"\searchresults.pdf"); + Volian.Base.Library.VlnSettings.TemporaryFolder + @"\searchresults.pdf", args.PaperSize); if (args.SearchString != null) myReport.SearchString = args.SearchString; if (!args.ReportTitle.Contains("Annotation")) @@ -1113,25 +1114,26 @@ namespace VEPROMS void displayLibDocs_PrintRequest(object sender, DisplayLibDocEventArgs args) { - Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.LibDocList, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\LibDocUsage.pdf"); + Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.LibDocList, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\LibDocUsage.pdf", args.PaperSize); myReport.Build(); } void displayReports_PrintRequest(object sender, DisplayReportsEventArgs args) { + // C2020-002 paper size is now set in the format files - default is Letter, pass this PDFReport if (args.TypesSelected == "RO Usage") { - Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.MyItemInfoList, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROUsageReport.pdf", args.SortUsageByProcedure,args.IncludeMissingROs); + Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.MyItemInfoList, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROUsageReport.pdf", args.SortUsageByProcedure,args.IncludeMissingROs, args.PaperSize); myReport.Build(); } else if (args.TypesSelected == "Complete RO Report") { - Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.RODataFile, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\CompleteROReport.pdf", args.RofstLookup, args.CompleteROReport, args.ConvertCaretToDelta, args.IncludeEmptyROFields); + Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.RODataFile, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\CompleteROReport.pdf", args.RofstLookup, args.CompleteROReport, args.ConvertCaretToDelta, args.IncludeEmptyROFields, args.PaperSize); myReport.Build(); } else if (args.TypesSelected == "RO Summary Report") { - Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROSummaryReport.pdf", args.RofstLookup, args.ROListForReport); + Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROSummaryReport.pdf", args.RofstLookup, args.ROListForReport, args.PaperSize); myReport.Build(); } diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 6ad8849e..74869269 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -513,6 +513,14 @@ namespace VEPROMS.CSLA.Library return _Font == null? _Font = new VE_Font(base.XmlNode): _Font; } } + private PDFPageSize _PDFPageSize; + public PDFPageSize PDFPageSize // C2020-002 paper size is now set in the format files + { + get + { + return _PDFPageSize == null ? _PDFPageSize = new PDFPageSize(SelectSingleNode("PDFPageSize")) : _PDFPageSize; + } + } private SymbolList _SymbolList; public SymbolList SymbolList { @@ -821,6 +829,21 @@ namespace VEPROMS.CSLA.Library } } #endregion + #region PaperSize + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PDFPageSize : vlnFormatItem + { + public PDFPageSize(XmlNode xmlNode) : base(xmlNode) { } + private LazyLoad _PaperSize; + public string PaperSize + { + get + { + return LazyLoad(ref _PaperSize, "@PaperSize"); // C2020-002 paper size is now set in the format files + } + } + } + #endregion #region Symbols [TypeConverter(typeof(ExpandableObjectConverter))] public class Symbol : vlnFormatItem