Fix possible symbol font discrepancy in tables
Allow options for handling foldout page if first page.
This commit is contained in:
@@ -462,7 +462,7 @@ namespace Volian.Print.Library
|
||||
PdfReader readerWord = null;
|
||||
string myPdfFile = null;
|
||||
_MyHelper.FinalMessageSectionID = finalMessageSectionID; // set VlnSvgPageHelper with the finalMessageSectionID
|
||||
//SectionConfig sc = mySection.MyConfig as SectionConfig;
|
||||
|
||||
if (mySection.IsAutoTOCSection)
|
||||
GenerateTOC(mySection, myProcedure, cb, _TextLayer);
|
||||
else
|
||||
@@ -471,10 +471,10 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (mySection.Steps != null && mySection.Steps.Count > 0)
|
||||
{
|
||||
// get first step to send to floading foldout indx.&& MyItemInfo.FoldoutIndex>-1)
|
||||
// get first step to send to floating foldout indx.&& MyItemInfo.FoldoutIndex>-1)
|
||||
ItemInfo firstStep = mySection.Steps[0];
|
||||
if (firstStep.FoldoutIndex() > -1)
|
||||
DoFoldoutPage(cb, "Beginning of Step Section", _TextLayer, _MyHelper, firstStep.FoldoutIndex());
|
||||
DoFoldoutPage(cb, "Beginning of Step Section", _TextLayer, _MyHelper, firstStep.FoldoutIndex(), InsertBlankPages);
|
||||
else if (!_MyHelper.CreatingFoldoutPage && _MyFoldoutReader.Count > 0 && InsertBlankPages)
|
||||
{
|
||||
// only insert a blank page if this section does not have a foldout (but the procedure as a whole does)
|
||||
@@ -554,7 +554,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
int pageNumber = 1 + ii;
|
||||
if (((mySection.MyDocStyle.StructureStyle.Style ?? 0) & E_DocStructStyle.UseSectionFoldout) != 0)
|
||||
DoFoldoutPage(cb, "Word Document", _TextLayer, _MyHelper, 0);
|
||||
DoFoldoutPage(cb, "Word Document", _TextLayer, _MyHelper, 0, false);
|
||||
if (readerWord != null)
|
||||
{
|
||||
bool doimport2 = true;
|
||||
@@ -876,9 +876,27 @@ namespace Volian.Print.Library
|
||||
cb.PdfDocument.NewPage(); // Temporary for foldout/16bit-32bit page alignment
|
||||
//_MyLog.InfoFormat("NewPage 7 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
public static void DoFoldoutPage(PdfContentByte cb, string str, PdfLayer textLayer, VlnSvgPageHelper myPageHelper, int foldoutindx)
|
||||
public static void DoFoldoutPage(PdfContentByte cb, string str, PdfLayer textLayer, VlnSvgPageHelper myPageHelper, int foldoutindx, bool insertBlankPages)
|
||||
{
|
||||
if (_MyFoldoutSection == null || _MyFoldoutSection.Count==0) return;
|
||||
|
||||
// if the very first page to be output is a 'foldout', treat this as a special case, since
|
||||
// if duplex printing is on, the foldout should always be on the left side, i.e. or behind
|
||||
// the document text. The option PROMS provides is to either:
|
||||
// 1) Skip doing the foldout before the first page, if the 'InsertBlankPages' isn't set, by not checking
|
||||
// the checkbox on the print dialog.
|
||||
// 2) Insert a blank page as the first page, if the 'InsertBlankPages' is set.
|
||||
if (!myPageHelper.PrintedAPage && !insertBlankPages) return;
|
||||
if (!myPageHelper.PrintedAPage)
|
||||
{
|
||||
// only insert a blank page if this is the very first page printed & section has a foldout
|
||||
// and the checkbox on the print dialog to add blank pages is checked. This will put out a blank page as
|
||||
// as the first page so that duplex printing is correct for this condition.
|
||||
myPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
cb.PdfDocument.NewPage();
|
||||
}
|
||||
|
||||
SectionInfo saveSect = myPageHelper.MySection;
|
||||
myPageHelper.MySection = _MyFoldoutSection[foldoutindx];
|
||||
myPageHelper.OnFoldoutPage = true;
|
||||
|
@@ -98,6 +98,15 @@ namespace Volian.Print.Library
|
||||
get { return _OnBlankPage; }
|
||||
set { _OnBlankPage = value; }
|
||||
}
|
||||
// when false, no page has been printed yet (for determining whether a blank page before print
|
||||
// needs done if first section has foldouts)
|
||||
private bool _PrintedAPage = false;
|
||||
public bool PrintedAPage
|
||||
{
|
||||
get { return _PrintedAPage; }
|
||||
set { _PrintedAPage = value; }
|
||||
}
|
||||
|
||||
private bool _AddBlankPagesForDuplexPrinting = false;
|
||||
public bool AddBlankPagesForDuplexPrinting // Tells us if a the option to add a blank page is turn on (for procedures with duplex foldouts)
|
||||
{
|
||||
@@ -140,7 +149,7 @@ namespace Volian.Print.Library
|
||||
PageListTopCheckOffHeader = null;
|
||||
PageListLastCheckOffHeader = null;
|
||||
YMultiplier = 1;
|
||||
|
||||
PrintedAPage = true;
|
||||
}
|
||||
private Gaps _MyGaps;
|
||||
public Gaps MyGaps
|
||||
|
@@ -690,7 +690,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
// Only do foldout page if not done for section break, i.e. check the there's a previous step.
|
||||
if (MyItemInfo.MyPrevious != null && MyItemInfo.FoldoutIndex() > -1)
|
||||
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
|
||||
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex(), false);
|
||||
else if (PromsPrinter.MyFoldoutReader.Count > 0 && MyPageHelper.MyPromsPrinter.InsertBlankPages)
|
||||
{
|
||||
// insert a blank page if this step section had a foldout associated and the checkbox
|
||||
@@ -752,7 +752,7 @@ namespace Volian.Print.Library
|
||||
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||
DebugText.WriteLine("Paginate2");
|
||||
if (MyItemInfo.MyHLS.FoldoutIndex() > -1)
|
||||
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.MyHLS.FoldoutIndex()); // temporary foldout
|
||||
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.MyHLS.FoldoutIndex(), false); // temporary foldout
|
||||
else if (PromsPrinter.MyFoldoutReader.Count > 0 && MyPageHelper.MyPromsPrinter.InsertBlankPages)
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
@@ -822,7 +822,7 @@ namespace Volian.Print.Library
|
||||
MyPageHelper.PageBookmarks.Add(MyItemInfo, ((si.DisplayNumber ?? "") == "" ? "" : si.DisplayNumber + " - ") + si.DisplayText, null);
|
||||
}
|
||||
if (MyItemInfo.FoldoutIndex() > -1)
|
||||
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
|
||||
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex(), false);
|
||||
else if (PromsPrinter.MyFoldoutReader.Count > 0 && MyPageHelper.MyPromsPrinter.InsertBlankPages)
|
||||
{
|
||||
// insert a blank page if this step section had a foldout associated and the checkbox
|
||||
|
Reference in New Issue
Block a user