added Docstyle format flag DSS_WordContentLandscaped to flag that Word content is landscaped

don’t change level for steps under sequentials (only under notes/cautions/equipment lists)
use Docstyle format flag DSS_WordContentLandscaped to make End message landscaped
This commit is contained in:
2014-11-18 15:12:23 +00:00
parent 443dc9adaf
commit 85a8a26504
4 changed files with 11 additions and 1 deletions

View File

@@ -723,7 +723,15 @@ namespace Volian.Print.Library
float wtpm = (float)mySection.MyDocStyle.Layout.PageWidth - (float)mySection.MyDocStyle.Layout.LeftMargin;
float centerpos = (float)mySection.MyDocStyle.Layout.LeftMargin + (wtpm - (mySection.MyDocStyle.End.Message.Length * mySection.MyDocStyle.End.Font.CharsToTwips)) / 2;
float yBottomMargin = Math.Max(0, (float)mySection.MyDocStyle.Layout.TopMargin - (float)mySection.MyDocStyle.Layout.PageLength - 2 * vlnPrintObject.SixLinesPerInch);
bool landscape = (mySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_WordContentLandscaped) == E_DocStructStyle.DSS_WordContentLandscaped;
if (landscape)
{
cb.SaveState();
System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(0, 1, -1, 0, cb.PdfDocument.PageSize.Height, 0);
cb.Transform(myMatrix);
}
Rtf2Pdf.TextAt(cb, para, centerpos, ylocation + 6, 100, 12, "", yBottomMargin);
if (landscape) cb.RestoreState();
}
}
OnStatusChanged("Merge MSWord", PromsPrinterStatusType.MergeMSWord);