PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Oct 03, 2022 3:14 pm

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Apr 27, 2022 8:56 am 

Joined: Wed Apr 27, 2022 8:49 am
Posts: 1

I have an existing PDF. It's generated by another system with no bookmarks and the Table of Contents has been built but is not clickable.

I'd like to amend the PDF so that the text in the Table of Contents is clickable and add bookmarks / useful navigation pane.

Complete newbie to the project here and was wondering if anyone had any pointers or sample code they could share?

I think I've worked out how to add the bookmarks thanks to some of the sample code on the website but struggling a bit with the Table of Contents hyperlinks.

I'm using the assumption for the purposes of my PoC that the text requiring to be turned into links will be preceded by an `@`, so a) will have to locate the text, b) remove the '@' character and c) wrap the text in a link that goes to Page N.


Reply with quote  
PostPosted: Thu Apr 28, 2022 9:06 am 
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 742
Location: CCAA

For the links you must specify the clickable area on the page. Potentially difficult to find that area if transformations are used.
There are some useful routines that show how you can extract text from PDF using PDFsharp.

Best regards
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 6 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