From 03385f2013ef6390d10a1ccbac0301b77db1a4c1 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 29 Oct 2014 14:43:15 +0000 Subject: [PATCH] Handle Landscape printing of BGE Valve sections --- PROMS/Volian.Print.Library/PromsPrinter.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index dffaf465..18d05551 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -1167,6 +1167,13 @@ namespace Volian.Print.Library vlnParagraph.PathPrefix = myItemInfo.Path; Rtf2Pdf.PdfDebug = true; Rtf2Pdf.Offset = new PointF(0, 2.5F); + if (section.MyDocStyle.LandscapePageList) + { + System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(0, 1, -1, 0, cb.PdfDocument.PageSize.Height, 0); + cb.Transform(myMatrix); + } + else + _MyHelper.IsLandscape = false; _MyHelper.ChangeBarDefinition = MyChangeBarDefinition; vlnParagraph myParagraph = new vlnParagraph(null, cb, myItemInfo, (float)myItemInfo.MyDocStyle.Layout.LeftMargin, _NoBreakYOffset, 0, myItemInfo.ColumnMode, myItemInfo.ActiveFormat, null, null, 0,true); float localYPageStart = 0; @@ -1201,6 +1208,10 @@ namespace Volian.Print.Library } if (sp == SectionConfig.SectionPagination.Separate) { + if (section.MyDocStyle.LandscapePageList) + { + _MyHelper.IsLandscape = false; + } cb.PdfDocument.NewPage(); // end of step section //_MyLog.InfoFormat("NewPage 6 {0}", cb.PdfWriter.CurrentPageNumber); _NoBreakYOffset = 0; @@ -1223,6 +1234,7 @@ namespace Volian.Print.Library yPageStart = localYPageStart; Volian.Base.Library.DebugText.WriteLine("NOBREAK:{0},'{1}','{2}','{3}','{4}','{5}'", section.ItemID, tmplocal, yTopMargin, localYPageStart, _NoBreakYOffset, myParagraph.YBottomMost); } + OnStatusChanged("StepSection converted to PDF " + section.ShortPath, PromsPrinterStatusType.BuildStep); } public static void DoFoldoutPage(PdfContentByte cb, string str, PdfLayer textLayer)