PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

Cells/Tables Formatting questions
http://forum.pdfsharp.de/viewtopic.php?f=2&t=4019
Page 1 of 1

Author:  IRlyDunno [ Tue Sep 24, 2019 10:10 am ]
Post subject:  Cells/Tables Formatting questions

I know that my question subject is a bit broad, but its only because I have a few different questions about Cell/Table formatting, so here it goes:

- How can I make the table (that can span several pages) skip the headers on the first page?
- How can I make footer rows?
- If the last question is true, is it possible to skip the footer on the last page that the table is drawn?
- Is there a way to count the number of rows a table has?
- Is it possible to set the leading of a Cell?


Thank you very much for your time in advance.

Author:  Thomas Hoevel [ Tue Sep 24, 2019 11:16 am ]
Post subject:  Re: Cells/Tables Formatting questions

Hi!
IRlyDunno wrote:
- How can I make the table (that can span several pages) skip the headers on the first page?
Not supported. Header rows are shown on every page.

IRlyDunno wrote:
- How can I make footer rows?
Not supported. Maybe use PDFsharp to add the footer later.

IRlyDunno wrote:
- Is there a way to count the number of rows a table has?
The Rows object should have a Count property.

IRlyDunno wrote:
- Is it possible to set the leading of a Cell?
I really dunno. Try the Padding and/or Margin properties. Maybe add an empty paragraph to each cell - you can exactly set the height of this empty paragraph.

Author:  IRlyDunno [ Tue Sep 24, 2019 11:49 am ]
Post subject:  Re: Cells/Tables Formatting questions

Thank you very much for the quick reply, I have another question,
I'm trying to make a 'Check Mark' sign in a cell. I tried to use Wingding and unicode and it doesn't works.

What are my options to do this?

Code sample:
Code:

string tick = "\u2713"; // Este é o valor do Certo/✔ em Segoe Ui Symbol
Cell Estornado = new Cell();
Estornado.Borders.Width = 0.5f;

var p = new Paragraph();
p.AddFormattedText("\u2713");
Estornado.Add(p, new Font("Segoe Ui Symbol"));



This' what I have and it doesn't work.

Author:  Thomas Hoevel [ Tue Sep 24, 2019 1:50 pm ]
Post subject:  Re: Cells/Tables Formatting questions

IRlyDunno wrote:
I'm trying to make a 'Check Mark' sign in a cell. I tried to use Wingding and unicode and it doesn't works.
It works when used properly.

Code snippet from our app:
Code:
var ft = new FormattedText();
ft.AddText(text);
ft.Font.Name = "Wingdings";
"ft" can now be added to a paragraph.

You do not set the font for the FormattedText - maybe that's the problem.

Author:  IRlyDunno [ Tue Sep 24, 2019 4:28 pm ]
Post subject:  Re: Cells/Tables Formatting questions

Thanks for the answer I used the code you showed and the result was MigraDoc not being able to show it again.

Attached an Image so that you can see, maybe I need to change something on the render pdfDocument?


And thank you again for your time and help!

Attachments:
Screenshot_4.png
Screenshot_4.png [ 1.54 KiB | Viewed 8482 times ]

Author:  Thomas Hoevel [ Tue Sep 24, 2019 4:45 pm ]
Post subject:  Re: Cells/Tables Formatting questions

IRlyDunno wrote:
Attached an Image so that you can see, maybe I need to change something on the render pdfDocument?
The image shows that it is not working. Maybe attach something useful that helps finding out why it is not working.
An MDDDL file could be a good start.
Using the IssueSubmissionTemplate could also work.

Author:  IRlyDunno [ Wed Sep 25, 2019 8:44 am ]
Post subject:  Re: Cells/Tables Formatting questions

First of all sorry for the late reply,

but you were right, the FormattedText wasn't being used correctly, the Font.Name wasn't being set and the text I needed to use for wingdings was the "ü" not what I was previously using, but now it works without a problem. Thank you very much for you help.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/