Hello!
I want to draw a TextFrame with both, a FillFormat and a LineFormat set. Here's my code:
Code:
Document document = new Document();
Section sec = document.AddSection();
TextFrame tf = sec.AddTextFrame();
tf.FillFormat.Color = Colors.Red;
tf.FillFormat.Visible = true;
tf.LineFormat.Color = Colors.Black;
tf.LineFormat.Width = Unit.FromMillimeter(1d);
tf.LineFormat.Visible = true;
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);
renderer.Document = document;
renderer.RenderDocument();
string filename = "TextFrameFillError.pdf";
renderer.PdfDocument.Save(filename);
System.Diagnostics.Process.Start(filename);
The output looks like this (the border is offset from the TextFrame to the top and to the left):
Attachment:
Screenshot.JPG [ 15.93 KiB | Viewed 9691 times ]
Am I doing something wrong? Please help!
Thanks a lot.