C2024-002-Print-Sections
This commit is contained in:
@@ -179,11 +179,11 @@ namespace Volian.Print.Library
|
||||
get { return _PDFFile; }
|
||||
set { _PDFFile = value; }
|
||||
}
|
||||
private int _pntSectID = -1;
|
||||
public int PntSectID
|
||||
private int _prtSectID = -1;
|
||||
public int PrtSectID
|
||||
{
|
||||
get { return _pntSectID; }
|
||||
set { _pntSectID = value; }
|
||||
get { return _prtSectID; }
|
||||
set { _prtSectID = value; }
|
||||
}
|
||||
private bool _DebugOutput;
|
||||
public bool DebugOutput
|
||||
@@ -323,7 +323,7 @@ namespace Volian.Print.Library
|
||||
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, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int PntSectID = -1)
|
||||
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int PrtSectID = -1)
|
||||
{
|
||||
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
||||
_MyItem = myItem;
|
||||
@@ -348,7 +348,7 @@ namespace Volian.Print.Library
|
||||
_DidAll = didAll;
|
||||
_MergeNotIncluded = false;
|
||||
_MergedPdf = mergedPdf;
|
||||
_pntSectID = PntSectID;
|
||||
_prtSectID = PrtSectID;
|
||||
//_MyReaderHelper.LoadTree(myItem);
|
||||
}
|
||||
// Pass 1 PDF Name
|
||||
@@ -368,11 +368,11 @@ namespace Volian.Print.Library
|
||||
// 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, bool makeTimeCriticalActionSummary, int PntSectID = -1)
|
||||
public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary, bool makeTimeCriticalActionSummary, int PrtSectID = -1)
|
||||
{
|
||||
if (_MyItem is ProcedureInfo)
|
||||
{
|
||||
_pntSectID = PntSectID;
|
||||
_prtSectID = PrtSectID;
|
||||
ProcedureConfig pcfg = (ProcedureConfig)(_MyItem as ProcedureInfo).MyConfig;
|
||||
if (DidAll && pcfg.Print_NotInMergeAll) // will be merging a pdf, so don't print this procedure if user set that on procedure propertures
|
||||
{
|
||||
@@ -807,7 +807,7 @@ namespace Volian.Print.Library
|
||||
int cnt = 0;
|
||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||
{
|
||||
if (PntSectID == -1 || (PntSectID > -1 && mySection.ItemID == PntSectID))
|
||||
if (PrtSectID == -1 || (PrtSectID > -1 && mySection.ItemID == PrtSectID))
|
||||
{
|
||||
if (!mySection.MyDocStyle.IsStepSection && !mySection.IsAutoTOCSection)
|
||||
{
|
||||
@@ -953,7 +953,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||
{
|
||||
if(PntSectID == -1 || (PntSectID > -1 && mySection.ItemID == PntSectID) )
|
||||
if(PrtSectID == -1 || (PrtSectID > -1 && mySection.ItemID == PrtSectID) )
|
||||
{
|
||||
// B2020-115 Calculate maximum available space on a page for figures
|
||||
vlnParagraph.hMax = ((float)mySection.MyDocStyle.Layout.PageLength);
|
||||
@@ -981,7 +981,7 @@ namespace Volian.Print.Library
|
||||
hlsItemId = mySection.Steps[0].ItemID;
|
||||
hlsText = mySection.Steps[0].DisplayText; // save the High level step text for use in the page list
|
||||
}
|
||||
cb.PdfWriter.PageEvent = _MyHelper = new VlnSvgPageHelper(mySection, this, hlsText, hlsItemId);
|
||||
cb.PdfWriter.PageEvent = _MyHelper = new VlnSvgPageHelper(mySection, this, hlsText, hlsItemId, PrtSectID);
|
||||
_MyHelper.AllowAllWatermarks = AllowAllWatermarks;
|
||||
_MyHelper.MyPdfWriter = cb.PdfWriter;
|
||||
_MyHelper.CreatingFoldoutPage = doingFoldout;
|
||||
@@ -1584,7 +1584,7 @@ namespace Volian.Print.Library
|
||||
bool inGroup = false;
|
||||
foreach (SectionInfo mySection in ii.Sections)
|
||||
{
|
||||
if (PntSectID == -1 || (PntSectID > -1 && mySection.ItemID == PntSectID))
|
||||
if (PrtSectID == -1 || (PrtSectID > -1 && mySection.ItemID == PrtSectID))
|
||||
{
|
||||
sectCnt++;
|
||||
SectionConfig sc = mySection.MyConfig as SectionConfig;
|
||||
@@ -2355,7 +2355,7 @@ namespace Volian.Print.Library
|
||||
iTextSharp.text.Rectangle pageSize = PDFPageSize.UsePaperSize(MyItem.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // C2020-002 paper size is now set in the format files
|
||||
PdfContentByte cb = OpenDoc(ref SupInfoPdfName, pageSize);
|
||||
if (cb == null) return;
|
||||
VlnSvgPageHelper myPageHelper = new VlnSvgPageHelper(vlnParagraph.MyItemInfo as SectionInfo, this, null, 0);
|
||||
VlnSvgPageHelper myPageHelper = new VlnSvgPageHelper(vlnParagraph.MyItemInfo as SectionInfo, this, null, 0, _prtSectID);
|
||||
cb.PdfWriter.PageEvent = myPageHelper;
|
||||
myPageHelper.AllowAllWatermarks = AllowAllWatermarks;
|
||||
myPageHelper.MyPdfWriter = cb.PdfWriter;
|
||||
@@ -2943,7 +2943,7 @@ namespace Volian.Print.Library
|
||||
if (ii.Sections == null) return; // B2021-067 crash on null reference
|
||||
foreach (SectionInfo si in ii.Sections)
|
||||
{
|
||||
if (MyPromsPrinter.PntSectID == -1 || (MyPromsPrinter.PntSectID > -1 && si.ItemID == MyPromsPrinter.PntSectID))
|
||||
if (MyPromsPrinter.PrtSectID == -1 || (MyPromsPrinter.PrtSectID > -1 && si.ItemID == MyPromsPrinter.PrtSectID))
|
||||
{
|
||||
if (si.IsStepSection)
|
||||
{
|
||||
|
Reference in New Issue
Block a user