PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Nov 17, 2019 9:23 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Sep 24, 2019 10:10 am 
Offline

Joined: Tue Aug 06, 2019 10:45 am
Posts: 20
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 24, 2019 11:16 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3004
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 24, 2019 11:49 am 
Offline

Joined: Tue Aug 06, 2019 10:45 am
Posts: 20
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 24, 2019 1:50 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3004
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 24, 2019 4:28 pm 
Offline

Joined: Tue Aug 06, 2019 10:45 am
Posts: 20
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 2037 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 24, 2019 4:45 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3004
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 25, 2019 8:44 am 
Offline

Joined: Tue Aug 06, 2019 10:45 am
Posts: 20
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group