PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Paragraph on the left, table on the right?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
Gilles



Joined: 06 Feb 2008
Posts: 4

PostPosted: Wed Feb 06, 2008 10:08 am    Post subject: Paragraph on the left, table on the right? Reply with quote

I am trying to create a report, which requires me that there is a paragraph (5 lines) on the left, and a table that is next to that paragraph.

Is that possible using:
paragraph = section.Headers.Primary.AddParagraph();
(and)
table = section.Headers.Primary.AddTable();

and to reposition the table (how?), or do i have to create a nested table for that, with in the first column the paragraph and in the second column the nested table?

Bah, nested tables is not possible..
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Wed Feb 06, 2008 10:19 am    Post subject: Reply with quote

I think that nested tables are the best solution with respect to automatic layout.

You could use a textframe for the paragraph and a normal table.
Or you could put the table into a textframe and use a normal paragraph.
Textframes work fine if you know the size of their contents.

If you know there are always 5 (or less) lines of text in the paragraph, then a textframe for the paragraph will work just fine.
You could encounter problems with a text of variable length however because you have to specify the size of the textframe.

To avoid overlap between textframe and table, you have to position the table accordingly.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Gilles



Joined: 06 Feb 2008
Posts: 4

PostPosted: Wed Feb 06, 2008 10:23 am    Post subject: Reply with quote

Hi Thomas,

Thank you for your fast reply, this really helps a lot. Is there a way to position the table on the document? I have searched for it but i could not find a "left" or "top" position.

I ask this because the textframe has a left and so on property, but i can't position the table "next" to it, can i?
Back to top
View user's profile Send private message
Gilles



Joined: 06 Feb 2008
Posts: 4

PostPosted: Wed Feb 06, 2008 10:24 am    Post subject: Reply with quote

P.s. how do you create a nested table? I don't see a "row.Cells[0].addTable()" command...
Back to top
View user's profile Send private message
Gilles



Joined: 06 Feb 2008
Posts: 4

PostPosted: Wed Feb 06, 2008 10:57 am    Post subject: Reply with quote

I fixed it using:

table = section.Headers.Primary.AddTable();
column = table.AddColumn("18.5cm");
column = table.AddColumn("8cm");
row = table.AddRow();

...

paragraph = row.Cells[0].AddParagraph();

...

TextFrame textframe = row.Cells[1].AddTextFrame();
table = textframe.AddTable();

...

etc.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com