PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jan 15, 2021 11:54 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jan 11, 2021 2:08 pm 
Offline

Joined: Mon Jan 11, 2021 2:00 pm
Posts: 2
Hi
I am trying to add DocumentLink on the Paragraph which I have added using Migradoc.

I have attached the photo of my document
It has Heading as Paragraph and then Table

I have added Tag to the Paragraph "API-Architecture" as below which is inside table row.

Code:
var paragraph = row.Cells[1].AddParagraph("API-Architecture");
row.Cells[1].Format.Alignment = ParagraphAlignment.Left;
paragraph.Tag = "API-Architecture";


And trying to read it like as below

Code:
RenderInfo[] renderInfos = pdfDocumentRenderer.DocumentRenderer.GetRenderInfoFromPage(1);


Here I only get two values in array

Quote:
ParagraphRenderer (Index Paragraph)
TableRenderer (Table)


But how can I get RendererInfo of the paragraphs inside table rows?

I want RendererInfo becuase I want to get the LayoutInfo from that.


Attachments:
File comment: My Document looks like this
Capture.PNG
Capture.PNG [ 16.45 KiB | Viewed 31 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 11, 2021 4:52 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 323
Hi!
Don't ask questions in the Samples section.
Thanks

_________________
Ă–hmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 12, 2021 8:21 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 608
Location: CCAA
yogesh.kushwaha wrote:
But how can I get RendererInfo of the paragraphs inside table rows?
I already did that in a project. I don't remember details and didn't find the old project in a quick search.

There is a way to find the cells contained in the table and the paragraphs in the cell. It requires recursion and cannot be done with a simple for loop.

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


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 12, 2021 9:22 am 
Offline

Joined: Mon Jan 11, 2021 2:00 pm
Posts: 2
TH-Soft wrote:
There is a way to find the cells contained in the table and the paragraphs in the cell. It requires recursion and cannot be done with a simple for loop.


I am able to find the paragraph inside cell by the Tag. but problem is I get it as Paragraph and not as ParagraphRenderer.


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 8 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