PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 11:46 am

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 
Offline

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

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.

Thanks!


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

Joined: Sat Mar 14, 2015 10:15 am
Posts: 906
Location: CCAA
Hi!

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
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
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 45 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group