B2019-152: landscape page numbers for print all/merge
This commit is contained in:
@@ -272,9 +272,14 @@ namespace Volian.Print.Library
|
||||
get { return _MergeNotIncluded; }
|
||||
set { _MergeNotIncluded = value; }
|
||||
}
|
||||
|
||||
private MergedPdf _MergedPdf;
|
||||
public MergedPdf MergedPdf
|
||||
{
|
||||
get { return _MergedPdf; }
|
||||
set { _MergedPdf = value; }
|
||||
}
|
||||
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite,
|
||||
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, bool removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll)
|
||||
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, bool removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf)
|
||||
{
|
||||
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
||||
_MyItem = myItem;
|
||||
@@ -295,6 +300,7 @@ namespace Volian.Print.Library
|
||||
_BlankPageText = blankPageText;
|
||||
_DidAll = didAll;
|
||||
_MergeNotIncluded = false;
|
||||
_MergedPdf = mergedPdf;
|
||||
//_MyReaderHelper.LoadTree(myItem);
|
||||
}
|
||||
// Pass 1 PDF Name
|
||||
@@ -311,6 +317,9 @@ namespace Volian.Print.Library
|
||||
get { return _BeforePageNumber2Pdf; }
|
||||
set { _BeforePageNumber2Pdf = value; }
|
||||
}
|
||||
// B2019-152: MergedLandscapePages is a dictionary whose key is the pdf file name & values are all of the page numbers
|
||||
// in that pdf that should have landscaped page numbers. These are added when the page is finished (onEndPage)
|
||||
public static Dictionary<string, List<int>> MergedLandscapePages = null;
|
||||
public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary)
|
||||
{
|
||||
if (_MyItem is ProcedureInfo)
|
||||
@@ -1273,6 +1282,22 @@ namespace Volian.Print.Library
|
||||
}
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
}
|
||||
// B2019-152: AddMergedLandscapePage adds entries to the dictionary that keeps track of what pages in a pdf are landscape
|
||||
// so that if merge is done, the pages that are landscaped can have landscaped page numbers placed on them
|
||||
public static void AddMergedLandscapePage(VlnSvgPageHelper _MyHelper, string PDFFile)
|
||||
{
|
||||
string tmp = PDFFile.Substring(0,PDFFile.IndexOf(".pdf"));
|
||||
if (MergedLandscapePages == null) MergedLandscapePages = new Dictionary<string, List<int>>();
|
||||
if (MergedLandscapePages.ContainsKey(tmp))
|
||||
MergedLandscapePages[tmp].Add(_MyHelper.CurrentPageNumber);
|
||||
else
|
||||
{
|
||||
// Create the list & add this to dictionary, pdf file with page list.
|
||||
List<int> children = new List<int>();
|
||||
children.Add(_MyHelper.CurrentPageNumber);
|
||||
MergedLandscapePages.Add(tmp, children);
|
||||
}
|
||||
}
|
||||
private void GenerateTOC(SectionInfo tocSection, ProcedureInfo myProcedure, PdfContentByte cb, PdfLayer textLayer)
|
||||
{
|
||||
iTextSharp.text.pdf.PdfWriter writer = cb.PdfWriter;
|
||||
|
Reference in New Issue
Block a user