If the current section is a foldout, then make the Link a remote link since the rest of the procedure is not part of the foldout page.

Import Links from the Foldout PDF.
This commit is contained in:
Rich 2016-02-25 19:46:34 +00:00
parent c7c8d7f4ec
commit f1f71e06bf
2 changed files with 15 additions and 3 deletions

View File

@ -1511,6 +1511,11 @@ namespace Volian.Print.Library
//pt.Description = "vlnParagrph"; //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); 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"; //pt.Description = "After vlnParagrph";
//if (myParagraph.MyItemInfo.InList(15906))
//{
// CPSGen myGen = new CPSGen(myParagraph);
// myGen.Generate("TestCPSGEN.xml");
//}
float localYPageStart = 0; float localYPageStart = 0;
float yPageStart = yTopMargin; float yPageStart = yTopMargin;
if (myItemInfo.HasChildren || myItemInfo.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || (myItemInfo.ActiveFormat.PlantFormat.FormatData.Express && myItemInfo.MyDocStyle.OptionalSectionContent)) 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) if (doimport2)
{// put the saved foldout page into the PDF {// put the saved foldout page into the PDF
AddImportedPageToLayer(cb.PdfWriter.DirectContent, textLayer, fgPage, 0, 0); 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}", if (DebugPagination.IsOpen) DebugPagination.WriteLine("{0:D6},'{1}',{2}",
myPageHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, "Foldout", 1); myPageHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, "Foldout", 1);
} }

View File

@ -954,7 +954,8 @@ namespace Volian.Print.Library
{ {
TransitionInfo ti = MyItemInfo.MyContent.ContentTransitions[0]; TransitionInfo ti = MyItemInfo.MyContent.ContentTransitions[0];
ItemInfo tiDefault = GetDefaultItemInfo(ti.MyItemToID); 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 { // Local Go To
if (ti.MyItemToID.MyContent.Type > 19999) if (ti.MyItemToID.MyContent.Type > 19999)
foreach (Chunk chk in IParagraph.Chunks) foreach (Chunk chk in IParagraph.Chunks)