Fixed B2013-160: printing with blank page option causes various problems when procedure has continuous sections and for sections after the procedure steps section
Fixed B2014-023, null reference crash when printing some Farley procedures. Also WCN BCK formatting
This commit is contained in:
@@ -493,12 +493,16 @@ namespace Volian.Print.Library
|
||||
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)
|
||||
// and the checkbox on the print dialog to add blank pages is checked
|
||||
_MyHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
cb.PdfDocument.NewPage();
|
||||
//_MyLog.InfoFormat("NewPage Begin Step Sect blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
// if it is continuous pagination, don't do blank page - not sure if this is correct place for this:
|
||||
if (mySection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate)
|
||||
{
|
||||
// only insert a blank page if this section does not have a foldout (but the procedure as a whole does)
|
||||
// and the checkbox on the print dialog to add blank pages is checked
|
||||
_MyHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
cb.PdfDocument.NewPage();
|
||||
//_MyLog.InfoFormat("NewPage Begin Step Sect blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
CreateStepPdf(mySection, cb);
|
||||
@@ -570,8 +574,12 @@ namespace Volian.Print.Library
|
||||
for (int ii = 0; ii < sectPageCount; ii++)
|
||||
{
|
||||
int pageNumber = 1 + ii;
|
||||
bool didFoldout = false;
|
||||
if (((mySection.MyDocStyle.StructureStyle.Style ?? 0) & E_DocStructStyle.UseSectionFoldout) != 0)
|
||||
{
|
||||
didFoldout = true;
|
||||
DoFoldoutPage(cb, "Word Document", _TextLayer, _MyHelper, 0, false);
|
||||
}
|
||||
if (readerWord != null)
|
||||
{
|
||||
bool doimport2 = true;
|
||||
@@ -588,7 +596,7 @@ namespace Volian.Print.Library
|
||||
OnStatusChanged("Read MSWord", PromsPrinterStatusType.ReadMSWord);
|
||||
if (doimport2)
|
||||
{
|
||||
if (cb.PdfWriter.CurrentPageNumber > 1 && _MyFoldoutReader.Count > 0 && InsertBlankPages)
|
||||
if (!didFoldout && cb.PdfWriter.CurrentPageNumber > 1 && _MyFoldoutReader.Count > 0 && InsertBlankPages)
|
||||
{
|
||||
// only insert a blank page if this section does not have a foldout (but the procedure as a whole does)
|
||||
// and the checkbox on the print dialog to add blank pages is checked
|
||||
|
Reference in New Issue
Block a user