Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Jun 18, 2015 3:42 am

Hello,

Thanks for your response.
I have reproduced your nested bookmarks issue. Sorry that our product doesn't support this feature at this stage. We will add it in our future upgrade.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Jun 18, 2015 1:24 pm

Well what does "nested bookmark" mean? It doesn't seem to do anything.

terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Fri Jun 19, 2015 6:24 am

Hello,

Thanks for your reply.
The "nested bookmark" means multistage bookmark.
Nested bookmarks can display the relationship between the topics. It can display the relationship of nested parent or child.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Jun 19, 2015 3:35 pm

Well that is what I am wanting. Could you please provide an example that "shows" the relationship between Parent and Child?

The example on your website does not show any relation ship. The parent and child bookmarks are all in one row. We need a better example please.

terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Mon Jun 22, 2015 9:32 am

Hello,

Thanks for your response. Sorry that currently our product doesn't support this kind of bookmark, so we are unable to provide you the better example.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Jun 22, 2015 1:57 pm

Gary, can you tell me what nested bookmarks are for, and what they do?

terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Tue Jun 23, 2015 5:56 am

Hello,

Thanks for your reply.
As I mentioned above, the "nested bookmark" is multistage bookmark for displaying the relationship of nested parent or child, actually we can't see the direct relationship in MS word same as in pdf, and the next version of Spire.DOC will support to convert the relationship to the PDF file, when it is released, we will let you know.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Jun 23, 2015 8:07 pm

>>actually we can't see the direct relationship in MS word same as in pdf

this statement is unclear.

Does it mean:
you can see the relationship in PDF and not in Word?

Or does it mean:
you can see the relationship in Word and not in PDF?

Thank you.

terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Wed Jun 24, 2015 1:30 am

Hello,

Thanks for your reply.
It means we can't see the relationship in Word and PDF now. But the next version of Spire.DOC will let us see the relationship in PDF.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Jul 02, 2015 2:55 am

Hello,

Thanks for your waiting.
The new version of Spire.DOC( Spire.Doc Pack Version:5.5 ) supports the nested bookmark in PDF when convert doc to pdf has been released. Please download it via link below and have a try:
http://www.e-iceblue.com/Download/download-word-for-net-now.html

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Jul 02, 2015 9:21 pm

Thank you Sweety, I will download it and let you know on Monday.

Thanks again for the update.

terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Mon Jul 06, 2015 8:46 am

Hello,

Have you tried the Spire.Doc Pack Version:5.5?
Has your issue been resolved?
Thanks for your feedback.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Mon Jul 06, 2015 4:40 pm

Sweety, I have tried it and the nesting bookmarks work, except for one thing.

The nested bookmarks do not act as "links" that take you to the text in the document.

Use my test code and click on one of the nested links and notice that you are not taken to that section in the document.

Code: Select all
public void BookMarks()
{
   string paraText = "\r\nthis is paragraph text...\r\n\r\n\r\nthis is paragraph text...\r\n\r\n\r\nthis is paragraph text...\r\n\r\n\r\nthis is paragraph text...\r\n\r\n\r\nthis is paragraph text...\r\n\r\n\r\nthis is paragraph text...\r\n\r\n\r\n";
   Document document = new Document();
   AddStyles(document);
   Section section = document.AddSection();

   Paragraph parentPara = section.AddParagraph();
   parentPara.ApplyStyle("MyHeader");
   parentPara.AppendBookmarkStart("TopLevel");
   parentPara.AppendText("TopLevel Bookmark");

   var para = section.AddParagraph();
   para.ApplyStyle("MySmall");
   para.AppendText(paraText);

   Paragraph childPara;

   for (int i = 0; i < 10; i++)
   {
      parentPara.AppendBookmarkStart("SimpleBookMark -" + i.ToString());
      childPara = section.AddParagraph();
      childPara.ApplyStyle("MyHeader");
      childPara.AppendText("BookMark:" + i.ToString());
      parentPara.AppendBookmarkEnd("SimpleBookMark -" + i.ToString());

      para = section.AddParagraph();
      para.ApplyStyle("MySmall");
      para.AppendText(paraText);

   }

   parentPara.AppendBookmarkEnd("TopLevel");

   Paragraph lastPara = section.AddParagraph();
   lastPara.ApplyStyle("MyHeader");
   lastPara.AppendBookmarkStart("last");
   lastPara.AppendText("Last Bookmark");

   para = section.AddParagraph();
   para.ApplyStyle("MySmall");
   para.AppendText(paraText);
   lastPara.AppendBookmarkEnd("last");

   ToPdfParameterList toPdf = new ToPdfParameterList();
   toPdf.CreateWordBookmarks = true;
   document.SaveToFile(@"e:\temp\Bookmarks2.Pdf", toPdf);
   System.Diagnostics.Process.Start(@"e:\temp\Bookmarks2.Pdf");

}
private static void AddStyles(Document document)
{
   ParagraphStyle bigFontStyle = new ParagraphStyle(document);
   bigFontStyle.Name = "MyHeader";
   bigFontStyle.CharacterFormat.FontName = "Arial";
   bigFontStyle.CharacterFormat.FontSize = 12;
   bigFontStyle.CharacterFormat.Bold = true;
   document.Styles.Add(bigFontStyle);

   ParagraphStyle tinyFontStyle = new ParagraphStyle(document);
   tinyFontStyle.Name = "MySmall";
   tinyFontStyle.CharacterFormat.FontName = "Arial";
   tinyFontStyle.CharacterFormat.FontSize = 7;
   document.Styles.Add(tinyFontStyle);
}



terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Tue Jul 07, 2015 3:48 am

Hello,

Thanks for your reply.
Please change your code of for loop to the below code.
Code: Select all
   for (int i = 0; i < 10; i++)
            {
                childPara = section.AddParagraph();
                childPara.AppendBookmarkStart("SimpleBookMark -" + i.ToString());
               
                childPara.ApplyStyle("MyHeader");
                childPara.AppendText("BookMark:" + i.ToString());
                childPara.AppendBookmarkEnd("SimpleBookMark -" + i.ToString());

                para = section.AddParagraph();
                para.ApplyStyle("MySmall");
                para.AppendText(paraText);

            }


Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Jul 07, 2015 1:34 pm

Sweety, If I change the loop to your code the bookmarks are no longer nested.

See the attached images of Nested (my loop) and NotNested (your loop).

terrence@mactexas.com
 
Posts: 95
Joined: Tue May 19, 2015 8:09 pm

Return to Spire.Doc