C2020-002 Logic to use either the Letter or A4 paper size
This commit is contained in:
@@ -75,8 +75,9 @@ namespace Volian.Print.Library
|
||||
private bool _ConvertCaretToDelta = true;
|
||||
private bool _IncludeEmptyROFields = false;
|
||||
|
||||
private string _PaperSize = "Letter"; // C2020-002 paper size is now set in the format files
|
||||
// Search Results Report
|
||||
public PDFReport(string reportTitle, string typesSelected, ICollection<ItemInfo> resultList, string fileName)
|
||||
public PDFReport(string reportTitle, string typesSelected, ICollection<ItemInfo> resultList, string fileName, string paperSize)
|
||||
{
|
||||
_ResultList = resultList;
|
||||
_FileName = fileName;
|
||||
@@ -84,21 +85,23 @@ namespace Volian.Print.Library
|
||||
_TypesSelected = VEPROMS.CSLA.Library.ItemInfo.ConvertToDisplayText(typesSelected);
|
||||
_ReportType = (int)ReportType.SearchResults;
|
||||
_ByLine = "PROMS Search Results";
|
||||
_PaperSize = paperSize;
|
||||
|
||||
}
|
||||
|
||||
// Library Document Report
|
||||
public PDFReport(string reportTitle, DocumentInfoList libDocList, string fileName)
|
||||
public PDFReport(string reportTitle, DocumentInfoList libDocList, string fileName, string paperSize)
|
||||
{
|
||||
_LibDocList = libDocList;
|
||||
_FileName = fileName;
|
||||
_ReportTitle = VEPROMS.CSLA.Library.ItemInfo.ConvertToDisplayText(reportTitle);
|
||||
_ReportType = (int)ReportType.LibraryDocUsage;
|
||||
_ByLine = "Generated By PROMS";
|
||||
_PaperSize = paperSize;
|
||||
}
|
||||
|
||||
// RO Usage
|
||||
public PDFReport(string reportTitle, ICollection<ItemInfo> resultList, string fileName, bool sortUsageByProcedure, bool includeMissingROs)
|
||||
public PDFReport(string reportTitle, ICollection<ItemInfo> resultList, string fileName, bool sortUsageByProcedure, bool includeMissingROs, string paperSize)
|
||||
{
|
||||
_ResultList = resultList;
|
||||
_FileName = fileName;
|
||||
@@ -107,10 +110,11 @@ namespace Volian.Print.Library
|
||||
_ByLine = "Generated By PROMS";
|
||||
_SortUsageByProcedure = sortUsageByProcedure;
|
||||
_IncludeMissingROs = includeMissingROs;
|
||||
_PaperSize = paperSize;
|
||||
}
|
||||
|
||||
// RO Complete RO Report
|
||||
public PDFReport(string reportTitle, string roDataFile, string outfile, ROFSTLookup fstlookup, bool completeReport, bool convertCaretToDelta, bool includeEmptyROFields)
|
||||
public PDFReport(string reportTitle, string roDataFile, string outfile, ROFSTLookup fstlookup, bool completeReport, bool convertCaretToDelta, bool includeEmptyROFields, string paperSize)
|
||||
{
|
||||
_FileName = outfile;
|
||||
_ReportTitle = reportTitle;
|
||||
@@ -120,10 +124,11 @@ namespace Volian.Print.Library
|
||||
_ConvertCaretToDelta = convertCaretToDelta;
|
||||
_ROFSTLookup = fstlookup;
|
||||
_IncludeEmptyROFields = includeEmptyROFields;
|
||||
_PaperSize = paperSize;
|
||||
}
|
||||
|
||||
// RO Summary Report
|
||||
public PDFReport(string reportTitle, string outfile, ROFSTLookup fstlookup, List<string> roList)
|
||||
public PDFReport(string reportTitle, string outfile, ROFSTLookup fstlookup, List<string> roList, string paperSize)
|
||||
{
|
||||
_FileName = outfile;
|
||||
_ReportTitle = reportTitle;
|
||||
@@ -131,6 +136,7 @@ namespace Volian.Print.Library
|
||||
_ByLine = "RO Summary Report";
|
||||
_ROFSTLookup = fstlookup;
|
||||
_ROList = roList;
|
||||
_PaperSize = paperSize;
|
||||
}
|
||||
|
||||
private string AddGroup(PdfPTable datatable, string dvPath, string lastDvPath, Font f2, bool StripLast, Color bgColor, bool skipFirst)
|
||||
@@ -365,7 +371,8 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public void Build()
|
||||
{
|
||||
iTextSharp.text.Document document = new iTextSharp.text.Document(PageSize.LETTER, 36, 36, 36, 36);
|
||||
//iTextSharp.text.Document document = new iTextSharp.text.Document(PageSize.LETTER, 36, 36, 36, 36);
|
||||
iTextSharp.text.Document document = new iTextSharp.text.Document(PDFPageSize.UsePaperSize(_PaperSize), 36, 36, 36, 36); // C2020-002 paper size is now set in the format files
|
||||
if (!CreateResultsPDF(document, _ReportType)) return;
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user