PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 4:31 pm

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
 Post subject: Table of Contents
PostPosted: Fri May 14, 2010 3:44 pm 
Offline

Joined: Thu Mar 11, 2010 2:16 pm
Posts: 9
Hi,

thats my 3rd post about the same subject. Please I really need an answer, even if it is a yes/no answer.

I need to use cross reference in Migradoc.
As far as I know, it is only possible to apply cross reference to page numbers (numpagefield). I would like to apply cross reference with Table of Contents, referencing the name of the sections, and along with the document, referencing figures or other stuffs.

Is that a way to do that?
If not, how can I improve it?

Best regards,
Joel


Top
 Profile  
Reply with quote  
 Post subject: Re: Table of Contents
PostPosted: Mon May 17, 2010 7:52 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Hi, Joel!
don4ld wrote:
As far as I know, it is only possible to apply cross reference to page numbers (numpagefield).

As far as I know, it's only possible to add Hyperlinks that reference Bookmarks in the document (target). The text displayed at the hyperlink can be anything.

If you add a bookmark for every figure, you can reference that.
If you add a bookmark for every table, you can reference that, too.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Table of Contents
PostPosted: Mon May 17, 2010 4:07 pm 
Offline

Joined: Thu Mar 11, 2010 2:16 pm
Posts: 9
Hi Thomas,

thank you for your answer.

I guess you didn't understood what i meant, or i am not understanding the point.

I'm not talking about the references while the document is being generated. I am talking about the resulting document. The generation only put fields for the pages numbers, the section names are not being treated the same way. If I open the document after its generation and add some page breaks, i could update the page fields automatically in the table of content, but if I edit the section names, the names of the table of contents will not update, they are static after the generation.

To do that it should exist something like a section ref field, or text ref field to be more generic, to use for the generation.

I'm a right? If not, what am i missing? If yes, how can i improve that?

thanks again,
Joel Cordeiro


Top
 Profile  
Reply with quote  
 Post subject: Re: Table of Contents
PostPosted: Tue May 25, 2010 8:17 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
don4ld wrote:
I guess you didn't understood what i meant, or i am not understanding the point.

This could be the case.

Do you want to create a Word document that is finally updated in Word (manually)?

If you use MigraDoc to create PDF files you can have all sorts of cross references.
Creating Word documents (RTF) is supported - but this was not the main intention of MigraDoc. Not all Word features are supported from within MigraDoc.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Table of Contents
PostPosted: Thu May 27, 2010 7:21 am 
Offline

Joined: Thu Mar 11, 2010 2:16 pm
Posts: 9
Hi,

i want to create a word document, and since word allows to edit the documents, i wish that it has fields that could be updated for the name of the sections on table of contents, or the number of the figures of the document.

If you create a Table of content in word manually, it creates references fields with the name of the sections or figures. If i change it, i just need to update the Table of Contents. With Migradoc it is not allowed, because the generation creates static text.

Regards,
Joel Cordeiro


Top
 Profile  
Reply with quote  
 Post subject: Re: Table of Contents
PostPosted: Thu May 27, 2010 7:38 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
don4ld wrote:
With Migradoc it is not allowed, because the generation creates static text.

The text is static, but page numbers are handled by Word and will be updated as needed.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Table of Contents
PostPosted: Thu May 27, 2010 4:40 pm 
Offline

Joined: Thu Mar 11, 2010 2:16 pm
Posts: 9
Yes, because it is a reference field.

I was reading the wordml and rtf specifications and now i have a better understanding of how it works. As long as I understand, the MigraDoc represents table of contents in a very similar way of what happens with WordML and RTF, the problem is the RTF renderer. The RTF Renderer is not rendering the bookmarks and the hyperlinks in the correct way, and thats the reason why the resulting document just have static text in the table of contents.
Is it right?

Regards,
Joel Cordeiro


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: Google [Bot] and 72 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