PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 4:25 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Nov 11, 2016 7:04 pm 
Offline

Joined: Fri Nov 11, 2016 7:00 pm
Posts: 1
I have a routine that creates a Migradoc table. I now want to extract the contents of that table for other uses.

Specifically I'd like to be able to access the plain text of a cell. My cells contain a single paragraph element. I cast cell.Elements[0] as a paragraph object (which works), but I don't know how to get back to the text. I don't see any method yielding that. ToString() just gives the type name.

Is this possible? Or will I need to create a separate array before putting values into the MigraDoc Table?


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 12, 2016 9:40 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
Hi!
gengelstein wrote:
Is this possible?
Yes, but you have to dig deeper.
A single paragraph can contain several FormattedText objects.

In your case there should be only a single Text element in the Element collection of the Paragraph.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 141 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