PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Table of Contents
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1186
Page 1 of 1

Author:  don4ld [ Fri May 14, 2010 3:44 pm ]
Post subject:  Table of Contents

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

Author:  Thomas Hoevel [ Mon May 17, 2010 7:52 am ]
Post subject:  Re: Table of Contents

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.

Author:  don4ld [ Mon May 17, 2010 4:07 pm ]
Post subject:  Re: Table of Contents

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

Author:  Thomas Hoevel [ Tue May 25, 2010 8:17 am ]
Post subject:  Re: Table of Contents

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.

Author:  don4ld [ Thu May 27, 2010 7:21 am ]
Post subject:  Re: Table of Contents

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

Author:  Thomas Hoevel [ Thu May 27, 2010 7:38 am ]
Post subject:  Re: Table of Contents

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.

Author:  don4ld [ Thu May 27, 2010 4:40 pm ]
Post subject:  Re: Table of Contents

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

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/