Added Enhanced Document Menus

SetAdministrator Support for Import and Export Procedure Sets, Import Procedure, Export Procedure
Added ROID PDF Destinations to Complete RO Report so that PDF Links can go to a specific Refenced Object in the Complete RO Report PDF.
Add PDF Links for Enhanced Documents and Complete RO Report
This commit is contained in:
Rich
2015-09-12 15:49:37 +00:00
parent a87decdbe3
commit 4c0fed9dce
4 changed files with 192 additions and 8 deletions

View File

@@ -943,14 +943,28 @@ namespace Volian.Print.Library
}
}
else // Remote Go To
{
foreach (Chunk chk in IParagraph.Chunks)
{
//Console.WriteLine("\"RemoteGoTo\"\t{0}", tiDefault.ItemID);
chk.SetRemoteGoto(ti.MyItemToID.MyProcedure.DisplayNumber.Replace("/", "_") + ".pdf", string.Format("ItemID={0}", tiDefault.ItemID));
chk.SetBackground(new Color(System.Drawing.Color.PeachPuff));
}
}
}
// MyPageHelper.BottomContent = yLocation - Height;
if (MyItemInfo.MyContent.ContentRoUsageCount > 0)
{
RoUsageInfo ru = MyItemInfo.MyContent.ContentRoUsages[0];
foreach (Chunk chk in IParagraph.Chunks)
{
chk.SetRemoteGoto("completeroreport.pdf", string.Format("ROID={0}", ru.ROID.Substring(0, 12)));
chk.SetBackground(new Color(System.Drawing.Color.LightGreen));
}
}
StepConfig sc = new StepConfig(MyItemInfo.MyContent.Config);
AddLinkToEnhancedDocument(cb, yLocation, sc.Step_SourceToBackground, "B", 6);
AddLinkToEnhancedDocument(cb, yLocation, sc.Step_SourceToDeviation, "D", 20);
// MyPageHelper.BottomContent = yLocation - Height;
//if (MyItemInfo.InList(39048)) Console.WriteLine("Here");
}
MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier);
@@ -983,6 +997,31 @@ namespace Volian.Print.Library
}
return retval;
}
private static void AddLinkToEnhancedDocument(PdfContentByte cb, float yLocation, string bdItemID, String token, int xLocation)
{
if (bdItemID != null)
{
int i = int.Parse(bdItemID);
ItemInfo ii = ItemInfo.Get(i);
string prefix = ii.MyDocVersion.DocVersionConfig.Print_PDFFilePrefix ?? "";
string suffix = ii.MyDocVersion.DocVersionConfig.Print_PDFFileSuffix ?? "";
ColumnText ct = new ColumnText(cb);
ct.SetSimpleColumn(xLocation, yLocation - 12, xLocation + 30, 12 + yLocation);
iTextSharp.text.Font font = FontFactory.GetFont("Arial", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 12);
Chunk chk = new Chunk(token);
chk.SetRemoteGoto(prefix + ii.MyProcedure.DisplayNumber.Replace("/", "_") + suffix + ".pdf", string.Format("ItemID={0}", ii.ItemID));
chk.SetBackground(new Color(System.Drawing.Color.LemonChiffon));
ct.AddElement(chk);
cb.SetColorFill(Color.BLUE);
ct.Go();
//foreach (Chunk chk in IParagraph.Chunks)
//{
// chk.SetRemoteGoto(ii.MyProcedure.DisplayNumber.Replace("/", "_") + ".pdf", string.Format("ItemID={0}",ii.ItemID));
// chk.SetBackground(new Color(System.Drawing.Color.LemonChiffon));
//}
}
}
private ItemInfo GetDefaultItemInfo(ItemInfo myItemInfo)
{