C2021-010: Print using standard pagination rules by removing trailing hard returns, spaces & manual page breaks

This commit is contained in:
2021-02-23 14:51:49 +00:00
parent 6499c9a23c
commit b679829508
11 changed files with 421 additions and 207 deletions

View File

@@ -8,6 +8,7 @@ using System.Windows.Forms;
using Volian.Print.Library;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using JR.Utils.GUI.Forms;
namespace VEPROMS
{
@@ -81,7 +82,7 @@ namespace VEPROMS
get { return _DidAll; }
set { _DidAll = value; }
}
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, bool removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf)
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf)
{
Prefix = prefix;
OpenPDF = openPDF;
@@ -220,6 +221,21 @@ namespace VEPROMS
{
OpenPDFandPlacekeeper(_PdfFile);
this.Close();
// C2021-010: Remove trailing returns/spaces & manual page breaks & allow save. Ask if user wants to save chanages
// if they were found.
if ((MyPromsPrinter.RemoveManualPageBreaks != null && MyPromsPrinter.RemoveManualPageBreaks.Count > 0)
|| (MyPromsPrinter.RemoveTrailingHardReturnsAndSpaces != null && MyPromsPrinter.RemoveTrailingHardReturnsAndSpaces.Count > 0))
{
if (UserInfo.CanEdit(frmVEPROMS.SMyUserInfo, MyPromsPrinter.MyItem.MyDocVersion))
{
if (FlexibleMessageBox.Show(this, "The procedure PDF file was created by removing certain hard returns,\r\ntrailing spaces, and manual page breaks that could affect the\r\n"+
"pagination of the procedure.\r\n\r\nAfter reviewing the PDF file, do you want to save the changes made?",
"Confirm Pagination Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
MyPromsPrinter.SavePaginationFixes();
}
}
}
return;
}
btnOpenFolder.Visible = btnOpenPDF.Visible = true;