PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
TextFrame.FillFormat AND TextFrame.LineFormat https://forum.pdfsharp.net/viewtopic.php?f=3&t=1346 |
Page 1 of 1 |
Author: | Xandolph [ Thu Sep 23, 2010 9:28 am ] |
Post subject: | TextFrame.FillFormat AND TextFrame.LineFormat |
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 8160 times ] Am I doing something wrong? Please help! Thanks a lot. |
Author: | Thomas Hoevel [ Thu Sep 23, 2010 12:21 pm ] |
Post subject: | Re: TextFrame.FillFormat AND TextFrame.LineFormat |
Xandolph wrote: Am I doing something wrong? I guess it's a bug. I'll put it on the list for the next release. Have you tried both builds (GDI+ and WPF)? Maybe the error occurs with one of them only. Which build do you use? |
Author: | Xandolph [ Thu Sep 23, 2010 3:19 pm ] |
Post subject: | Re: TextFrame.FillFormat AND TextFrame.LineFormat |
I use GDI+. Thanks for your reply. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |