PDF · C# walkthrough
Handbook with a linked contents page
Help readers return to the right procedure quickly in a document that also works as a printed handout.
- Start with
- Workshop stages, timings and follow-up guidance
- Generate

How it works
Declare the contents
Place TableOfContents near the start so readers can see the document structure.
Create semantic sections
Wrap each stage in Section to supply the titles and destinations used by the contents and outline.
Control the handout break
Start the follow-up section on a new page and include page numbers for printed copies.
The rest of the document
The C# source
This is the complete example file used to generate the download. The walkthrough runner creates the output directory and produces the additional previews.
using OfficeIMO.Pdf;
namespace OfficeIMO.Examples.Showcase.Workflows;
/// <summary>Authors a compact handbook with a generated table of contents and named sections.</summary>
internal static class NavigableHandbook {
internal static void Create(string folder) {
PdfColor navy = PdfColor.FromRgb(23, 54, 93);
PdfDocument.Create(pdf => pdf.Content(content => content
.H1("Community workshop handbook", PdfAlign.Left, navy)
.Paragraph(p => p.Text("A practical reference for hosts, facilitators and volunteers."))
.TableOfContents()
.Section("Before participants arrive", section => section
.Bullets(new[] { "Check access, seating and the sign-in desk.", "Test the demonstration equipment.", "Name the person who handles questions and changes." }))
.Section("Run the session", section => section
.Paragraph(p => p.Text("Explain the outcome, demonstrate one complete example and leave time for participants to try it themselves."))
.Table(new[] {
new[] { "Segment", "Minutes", "Purpose" },
new[] { "Welcome", "10", "Set expectations and introduce the team" },
new[] { "Demonstration", "20", "Show one complete workflow" },
new[] { "Practice", "35", "Let participants apply the technique" },
new[] { "Review", "10", "Capture questions and next steps" }
}, style: new PdfTableStyle { HeaderFill = navy, HeaderTextColor = PdfColor.White, HeaderRowCount = 1, CellPaddingX = 8, CellPaddingY = 8 }))
.PageBreak()
.Section("Close and follow up", section => section
.Paragraph(p => p.Text("Finish with an outcome participants can keep: an example file, a checklist or a clear next action."))
.H2("Before leaving", PdfAlign.Left, navy)
.Bullets(new[] { "Collect shared equipment and remove temporary accounts.", "Record unanswered questions with named follow-up owners.", "Share the promised materials through the agreed channel." })
.H2("Review the workshop", PdfAlign.Left, navy)
.Paragraph(p => p.Text("Compare the planned outcome with what participants completed. Separate problems with the exercise from problems with the room or equipment."))
.Paragraph(p => p.Text("Use the PDF table of contents or bookmarks to return to a section.")))),
new PdfOptions { DefaultFontSize = 11, ShowPageNumbers = true, CreateOutlineFromHeadings = true })
.Meta(title: "Community workshop handbook", author: "OfficeIMO")
.Save(Path.Combine(folder, "example.pdf"));
}
}
Open the C# source fileRun it from the source checkout
Clone the OfficeIMO repository and run this command from its root with the .NET 10 SDK. The first run restores the example project's dependencies.
dotnet run --project OfficeIMO.Examples -f net10.0 -- --showcase-workflows --showcase-example pdf-navigable-handbookThe files are written to OfficeIMO.Examples/bin/Debug/net10.0/Documents/Workflows/pdf-navigable-handbook/. To use the example in your application, start with the PDF guide and its package setup.
Downloads and scope
What the preview shows
The linked C# example generates this file. The page images are rendered from the downloadable PDF with Poppler. Interactive structures are inspected separately from the static preview.
What to keep in mind
The generated PDF contains the navigation structure. Static page images show the layout; viewer-specific bookmark panels are not pictured.
