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;
|
||||
|
Reference in New Issue
Block a user