diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 4b405676..8607c52c 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -324,7 +324,7 @@ namespace Volian.Print.Library DateTime tStart = DateTime.Now; string MSWordFile = null; if (section.MyContent.ContentEntryCount == 1) - { + { MSWordToPDF.DocReplace = DocReplace; MSWordFile = MSWordToPDF.GetDocPdf(section, PrintOverride.TextColor); MSWordToPDF.DocReplace = null; @@ -1511,6 +1511,11 @@ namespace Volian.Print.Library //pt.Description = "vlnParagrph"; vlnParagraph myParagraph = new vlnParagraph(null, cb, myItemInfo, (float)myItemInfo.MyDocStyle.Layout.LeftMargin, _NoBreakYOffset, 0, myItemInfo.ColumnMode, myItemInfo.ActiveFormat, null, null, 0,true,this); //pt.Description = "After vlnParagrph"; + //if (myParagraph.MyItemInfo.InList(15906)) + //{ + // CPSGen myGen = new CPSGen(myParagraph); + // myGen.Generate("TestCPSGEN.xml"); + //} float localYPageStart = 0; float yPageStart = yTopMargin; if (myItemInfo.HasChildren || myItemInfo.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || (myItemInfo.ActiveFormat.PlantFormat.FormatData.Express && myItemInfo.MyDocStyle.OptionalSectionContent)) @@ -1615,6 +1620,12 @@ namespace Volian.Print.Library if (doimport2) {// put the saved foldout page into the PDF AddImportedPageToLayer(cb.PdfWriter.DirectContent, textLayer, fgPage, 0, 0); + foreach (iTextSharp.text.pdf.PdfAnnotation.PdfImportedLink il in _MyFoldoutReader[foldoutindx].GetLinks(1)) + { + if(!il.IsInternal() ) + cb.PdfWriter.AddAnnotation(il.CreateAnnotation(cb.PdfWriter)); + } + if (DebugPagination.IsOpen) DebugPagination.WriteLine("{0:D6},'{1}',{2}", myPageHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, "Foldout", 1); } @@ -1773,7 +1784,7 @@ namespace Volian.Print.Library catch (Exception ex) { if (_MyPromsPrinter.DocReplace == null) - MessageBox.Show(ex.Message, ex.GetType().FullName, MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(ex.Message, ex.GetType().FullName, MessageBoxButtons.OK, MessageBoxIcon.Error); _MyLog.Warn(string.Format("Error in LoadSectionTree [{0}],{1}.{2}", si.ItemID, si.DisplayNumber, si.DisplayText), ex); } } diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 9d3a420b..557514fb 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -954,7 +954,8 @@ namespace Volian.Print.Library { TransitionInfo ti = MyItemInfo.MyContent.ContentTransitions[0]; ItemInfo tiDefault = GetDefaultItemInfo(ti.MyItemToID); - if (ti.MyItemToID.MyProcedure.ItemID == MyItemInfo.MyProcedure.ItemID) + if (ti.MyItemToID.MyProcedure.ItemID == MyItemInfo.MyProcedure.ItemID && + ! MyItemInfo.ActiveSection.DisplayNumber.ToUpper().StartsWith("FOLDOUT")) { // Local Go To if (ti.MyItemToID.MyContent.Type > 19999) foreach (Chunk chk in IParagraph.Chunks)