This commit is contained in:
parent
b4d21fb709
commit
2dcb0a0bd6
@ -88,6 +88,13 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public class Rtf2iTextSharp : RtfVisualVisitorBase
|
||||
{
|
||||
private static bool _DoingComparison = false;
|
||||
public static bool DoingComparison
|
||||
{
|
||||
get { return Rtf2iTextSharp._DoingComparison; }
|
||||
set { Rtf2iTextSharp._DoingComparison = value; }
|
||||
}
|
||||
|
||||
private IRtfDocument _RtfDoc;
|
||||
private Paragraph _MyParagraph = new Paragraph();
|
||||
private iTextSharp.text.Font _MyFont;
|
||||
@ -177,6 +184,11 @@ namespace Volian.Print.Library
|
||||
(visualText.Format.IsBold ? iTextSharp.text.Font.BOLD : 0) +
|
||||
(visualText.Format.IsItalic ? iTextSharp.text.Font.ITALIC : 0));
|
||||
font.Color = new iTextSharp.text.Color(PrintOverride.OverrideTextColor(visualText.Format.ForegroundColor.AsDrawingColor));
|
||||
// The following line of code was added to allow for comparisons between the 16bit and 32bit pdf files. Without
|
||||
// the size change, the overlays did not match up. It seems that the 16bit font size may be inaccurate
|
||||
// and the 16bit conversion to be pdf may be off.
|
||||
if (font.Familyname.StartsWith("Arial") && font.Size == 11 && DoingComparison) font.Size = 11.15f;
|
||||
|
||||
Chunk chk = new Chunk(visualText.Text, font);
|
||||
if(visualText.Format.BackgroundColor.AsDrawingColor.ToArgb() != System.Drawing.Color.White.ToArgb())
|
||||
chk.SetBackground(new iTextSharp.text.Color(visualText.Format.BackgroundColor.AsDrawingColor));
|
||||
|
Loading…
x
Reference in New Issue
Block a user