B2018-034 Use _IParagraph when PDF Link info is added
B2018-034 Copy the attributes from old to new when IParagraph is refreshed (IsCompressed)
This commit is contained in:
@@ -942,7 +942,6 @@ namespace Volian.Print.Library
|
||||
vcb.Messages.Add(key + heightDif, msd[key]);
|
||||
}
|
||||
}
|
||||
|
||||
private float DrawText(PdfContentByte cb, ref float yPageStart, float yTopMargin, float yBottomMargin, ref float yLocation)
|
||||
{
|
||||
if (DebugText.IsOpen) DebugText.WriteLine("{0},'{1}','{2}','<<END>>'", MyItemInfo.ItemID, MyItemInfo.DBSequence, FormattedText);
|
||||
@@ -1009,11 +1008,17 @@ namespace Volian.Print.Library
|
||||
// Need to have a way to get to sections which do not have any output (header only)
|
||||
// Need to have a way to identify procedures
|
||||
//
|
||||
if (IParagraph.Chunks.Count > 0 && MyPageHelper.MyPromsPrinter.SaveLinks)
|
||||
// B2018-034 The following code previously used IParagraph rather than _IParagraph. If the variable IsCompressed (7LPI) is true for this step
|
||||
// IParagraph would be refreshed each time it was referenced. Thus the link information would be lost when the IParagraph was re-created.
|
||||
// This resulted in PDFLinks to steps that were not not identified with a LocalDestination. This was changed from the original code to
|
||||
// fix B2015-076 when the Byron Flex Procedure 0BFSG-6 was printed. The issue for this bug was that the underlining at 7LPI was overlaping the
|
||||
// top of the next line of text. I was not able to find the case referencedd in the source safe document. However, by adding a line of
|
||||
// text "One more line" to the end of step 2 in attachment C, I was able to see the effect.
|
||||
if (_IParagraph.Chunks.Count > 0 && MyPageHelper.MyPromsPrinter.SaveLinks)
|
||||
{
|
||||
Chunk chk1 = IParagraph.Chunks[0] as Chunk;
|
||||
//Console.WriteLine("\"Desination\"\t{0}", MyItemInfo.ItemID);
|
||||
if (MyItemInfo.MyContent.Text.ToUpper().Contains("LINK:TR"))
|
||||
// B2018-034 The following code previously used IParagraph rather than _IParagraph. See first Comment
|
||||
Chunk chk1 = _IParagraph.Chunks[0] as Chunk;
|
||||
if (MyItemInfo.MyContent.Text.ToUpper().Contains("LINK:TR") && MyItemInfo.MyContent.ContentTransitionCount==0)
|
||||
Console.WriteLine("Missing Transition {0}", MyItemInfo.ItemID);
|
||||
chk1.SetLocalDestination(string.Format("ItemID={0}", MyItemInfo.ItemID)); // Destination
|
||||
if (MyItemInfo.MyContent.ContentTransitionCount > 0)
|
||||
@@ -1024,7 +1029,8 @@ namespace Volian.Print.Library
|
||||
!MyItemInfo.ActiveSection.DisplayNumber.ToUpper().StartsWith("FOLDOUT"))
|
||||
{ // Local Go To
|
||||
if (ti.MyItemToID.MyContent.Type > 19999)
|
||||
foreach (Chunk chk in IParagraph.Chunks)
|
||||
// B2018-034 The following code previously used IParagraph rather than _IParagraph. See first Comment
|
||||
foreach (Chunk chk in _IParagraph.Chunks)
|
||||
{
|
||||
//Console.WriteLine("\"LocalGoTo\"\t{0}", tiDefault.ItemID);
|
||||
chk.SetLocalGoto(string.Format("ItemID={0}", tiDefault.ItemID));
|
||||
@@ -1045,7 +1051,8 @@ namespace Volian.Print.Library
|
||||
if (MyItemInfo.MyContent.ContentRoUsageCount > 0)
|
||||
{
|
||||
RoUsageInfo ru = MyItemInfo.MyContent.ContentRoUsages[0];
|
||||
foreach (Chunk chk in IParagraph.Chunks)
|
||||
// B2018-034 The following code previously used IParagraph rather than _IParagraph. See first Comment
|
||||
foreach (Chunk chk in _IParagraph.Chunks)
|
||||
{
|
||||
if (ru.ROID.Substring(0, 4) != "FFFF")
|
||||
{
|
||||
@@ -2263,6 +2270,7 @@ namespace Volian.Print.Library
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
return yPageStart;
|
||||
}
|
||||
|
||||
private bool IsPrintedStepItemForSupInfo()
|
||||
{
|
||||
bool printedMySectTitle = true;
|
||||
|
Reference in New Issue
Block a user