Added option to Remove Trailing Hard Returns and Manual Page Breaks
This commit is contained in:
parent
1cd18c985d
commit
ad1980e434
@ -170,7 +170,9 @@ namespace Volian.Print.Library
|
|||||||
// on that first step.
|
// on that first step.
|
||||||
StepConfig sc = firstChild.MyItemInfo.MyConfig as StepConfig;
|
StepConfig sc = firstChild.MyItemInfo.MyConfig as StepConfig;
|
||||||
ManualPageBreak = MyPageHelper.OriginalPageBreak ? (sc == null ? false : sc.Step_ManualPagebreak) :
|
ManualPageBreak = MyPageHelper.OriginalPageBreak ? (sc == null ? false : sc.Step_ManualPagebreak) :
|
||||||
sc == null ? false : sc.Step_NewManualPagebreak;
|
sc == null ? false :
|
||||||
|
MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndManualPageBreaks ? false : sc.Step_NewManualPagebreak;
|
||||||
|
|
||||||
if (ManualPageBreak)
|
if (ManualPageBreak)
|
||||||
{
|
{
|
||||||
SectionPageBreak = true;
|
SectionPageBreak = true;
|
||||||
@ -292,7 +294,7 @@ namespace Volian.Print.Library
|
|||||||
//Console.WriteLine("{0} Paginate", MyPageHelper.HLSText);
|
//Console.WriteLine("{0} Paginate", MyPageHelper.HLSText);
|
||||||
StepConfig sc1 = MyItemInfo.MyConfig as StepConfig;
|
StepConfig sc1 = MyItemInfo.MyConfig as StepConfig;
|
||||||
ManualPageBreak = MyPageHelper.OriginalPageBreak ? (sc1 == null ? false : sc1.Step_ManualPagebreak) :
|
ManualPageBreak = MyPageHelper.OriginalPageBreak ? (sc1 == null ? false : sc1.Step_ManualPagebreak) :
|
||||||
sc1 == null ? false : sc1.Step_NewManualPagebreak;
|
sc1 == null ? false : MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndManualPageBreaks ? false : sc1.Step_NewManualPagebreak;
|
||||||
if (MyItemInfo.FirstSibling == MyItemInfo && ManualPageBreak)
|
if (MyItemInfo.FirstSibling == MyItemInfo && ManualPageBreak)
|
||||||
{
|
{
|
||||||
// if parent/section used this pagebreak, skip it.
|
// if parent/section used this pagebreak, skip it.
|
||||||
|
@ -92,6 +92,13 @@ namespace Volian.Print.Library
|
|||||||
get { return _SaveLinks; }
|
get { return _SaveLinks; }
|
||||||
set { _SaveLinks = value; }
|
set { _SaveLinks = value; }
|
||||||
}
|
}
|
||||||
|
private bool _RemoveTrailingHardReturnsAndManualPageBreaks = false;
|
||||||
|
public bool RemoveTrailingHardReturnsAndManualPageBreaks
|
||||||
|
{
|
||||||
|
get { return _RemoveTrailingHardReturnsAndManualPageBreaks; }
|
||||||
|
set { _RemoveTrailingHardReturnsAndManualPageBreaks = value; }
|
||||||
|
}
|
||||||
|
|
||||||
private string _Prefix = ""; // RHM20150506 Multiline ItemID TextBox
|
private string _Prefix = ""; // RHM20150506 Multiline ItemID TextBox
|
||||||
public string Prefix
|
public string Prefix
|
||||||
{
|
{
|
||||||
@ -214,7 +221,7 @@ namespace Volian.Print.Library
|
|||||||
set { _MyReaderHelper = value; }
|
set { _MyReaderHelper = value; }
|
||||||
}
|
}
|
||||||
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite,
|
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)
|
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, bool removeTrailngHardReturnsAndManualPageBreaks)
|
||||||
{
|
{
|
||||||
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
||||||
_MyItem = myItem;
|
_MyItem = myItem;
|
||||||
@ -231,6 +238,7 @@ namespace Volian.Print.Library
|
|||||||
_BatchPrint = batchPrint;
|
_BatchPrint = batchPrint;
|
||||||
_MyReaderHelper = new ReaderHelper(this);
|
_MyReaderHelper = new ReaderHelper(this);
|
||||||
_SaveLinks = saveLinks;
|
_SaveLinks = saveLinks;
|
||||||
|
_RemoveTrailingHardReturnsAndManualPageBreaks = removeTrailngHardReturnsAndManualPageBreaks;
|
||||||
//_MyReaderHelper.LoadTree(myItem);
|
//_MyReaderHelper.LoadTree(myItem);
|
||||||
}
|
}
|
||||||
private string _BeforePageNumberPdf = null;
|
private string _BeforePageNumberPdf = null;
|
||||||
@ -268,7 +276,14 @@ namespace Volian.Print.Library
|
|||||||
FileInfo fi = new FileInfo(retstr);
|
FileInfo fi = new FileInfo(retstr);
|
||||||
FileInfo fidest = new FileInfo(di1.FullName + @"\" + fi.Name);
|
FileInfo fidest = new FileInfo(di1.FullName + @"\" + fi.Name);
|
||||||
if (fidest.Exists) fidest.Delete();
|
if (fidest.Exists) fidest.Delete();
|
||||||
fi.MoveTo(di1.FullName + @"\" + fi.Name);
|
try
|
||||||
|
{
|
||||||
|
fi.MoveTo(di1.FullName + @"\" + fi.Name);
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_MyLog.ErrorFormat("{0} During Save {1}", ex.GetType().FullName, ex.Message);
|
||||||
|
}
|
||||||
ClearTransPageNumProblems();
|
ClearTransPageNumProblems();
|
||||||
RefreshPageNumber(_MyItem);
|
RefreshPageNumber(_MyItem);
|
||||||
ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo);
|
ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo);
|
||||||
|
@ -4444,7 +4444,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
int profileDepth = ProfileTimer.Push(">>>> GetRtf");
|
int profileDepth = ProfileTimer.Push(">>>> GetRtf");
|
||||||
_RtfSB = new StringBuilder();
|
_RtfSB = new StringBuilder();
|
||||||
DisplayText vlntxt = new DisplayText(itemInfo, E_EditPrintMode.Print, E_ViewMode.View, true, E_FieldToEdit.StepText, false, prefix, suffix);
|
DisplayText vlntxt = new DisplayText(itemInfo, E_EditPrintMode.Print, E_ViewMode.View, true, E_FieldToEdit.StepText, false, prefix, suffix,MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndManualPageBreaks);
|
||||||
System.Drawing.Font myFont = vlntxt.TextFont.WindowsFont;
|
System.Drawing.Font myFont = vlntxt.TextFont.WindowsFont;
|
||||||
if (!itemInfo.IsTable && StepRTB.MyFontFamily != null)
|
if (!itemInfo.IsTable && StepRTB.MyFontFamily != null)
|
||||||
myFont = new System.Drawing.Font(StepRTB.MyFontFamily, myFont.Size, myFont.Style);
|
myFont = new System.Drawing.Font(StepRTB.MyFontFamily, myFont.Size, myFont.Style);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user