ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.06k stars 235 forks source link

Bookmarking is not apparently supported #321

Open DesertYew opened 1 year ago

DesertYew commented 1 year ago

I can add a bookmark to a Section.Elements group but it doesn't show in the rendered PDF, nor is there an apparent means to reference a bookmark (i.e., from a table of contents). For long documents this is a showstopper for using this library. Sample: Document document = new Document();

        document.Comment = cookbook.CookbookTitle;
        document.DefaultTabStop = new Unit(0.5, UnitType.Inch);
        document.Info.Title = cookbook.CookbookTitle;
        document.Info.Keywords = "Cookbook, PDF Copy";
        document.Info.Subject = "Generated from \"Our Recipes v2.0\" on " + DateTime.Now.ToString();
        Section titlepage = document.AddSection();
        titlepage.PageSetup = SetupPage();
        AddCookbookTitle(titlepage, cookbook.CookbookTitle);
        foreach (OREntry entry in cookbook)
        {
            Recipe = new Recipe(cookbook.CookbookPath, entry);
            Section page1 = document.AddSection();
            page1.Elements.Add(new BookmarkField(Recipe.RecipeName));

...