This commit is contained in:
parent
10e0736193
commit
b4d5b3f70a
@ -989,7 +989,6 @@ namespace Volian.Print.Library
|
|||||||
// there may be other places that double space, but this supports it for RNOs (the DoubleRNOspace flag)
|
// there may be other places that double space, but this supports it for RNOs (the DoubleRNOspace flag)
|
||||||
if (rnoLevel > maxRNO && itemInfo.FormatStepData.DoubleSpace) yoff = YOffset = yoff + SixLinesPerInch;
|
if (rnoLevel > maxRNO && itemInfo.FormatStepData.DoubleSpace) yoff = YOffset = yoff + SixLinesPerInch;
|
||||||
}
|
}
|
||||||
if (itemInfo.ItemID == 191) Console.WriteLine("here");
|
|
||||||
AddMacros(itemInfo, mytab);
|
AddMacros(itemInfo, mytab);
|
||||||
if (mytab != null)
|
if (mytab != null)
|
||||||
{
|
{
|
||||||
|
@ -250,6 +250,25 @@ namespace Volian.Print.Library
|
|||||||
Rtf2iTextSharp rtf2IText = new Rtf2iTextSharp(rtfDoc);
|
Rtf2iTextSharp rtf2IText = new Rtf2iTextSharp(rtfDoc);
|
||||||
iTextSharp.text.Paragraph para = rtf2IText.Convert();
|
iTextSharp.text.Paragraph para = rtf2IText.Convert();
|
||||||
para.SetLeading(_SixLinesPerInch, 0);
|
para.SetLeading(_SixLinesPerInch, 0);
|
||||||
|
if (rtf.Contains("\x05"))
|
||||||
|
{
|
||||||
|
// if there is a hanging indent, the iTextSharp paragraph properties must be set
|
||||||
|
// to print the indent. Replace the indent 'token' with a non-used symbol, this will
|
||||||
|
// create a chunk with that symbol. Then loop through all of the chunks until we find
|
||||||
|
// this symbol, adding up the widths to that point. This width is the value that
|
||||||
|
// needs to be used to set the indent.
|
||||||
|
IRtfDocument rtfDoc2 = RtfInterpreterTool.BuildDoc(rtf.Replace("\x05", @"\f1 \u9999? \f0 "));
|
||||||
|
Rtf2iTextSharp rtf2IText2 = new Rtf2iTextSharp(rtfDoc2);
|
||||||
|
iTextSharp.text.Paragraph para2 = rtf2IText2.Convert();
|
||||||
|
float chkW = 0;
|
||||||
|
foreach (Chunk chk in para2.Chunks)
|
||||||
|
{
|
||||||
|
if (chk.Content[0] == 9999) break;
|
||||||
|
chkW += chk.GetWidthPoint();
|
||||||
|
}
|
||||||
|
para.IndentationLeft = chkW;
|
||||||
|
para.FirstLineIndent = -chkW;
|
||||||
|
}
|
||||||
return para;
|
return para;
|
||||||
}
|
}
|
||||||
public abstract float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin);
|
public abstract float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user