PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 1:49 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Hyperlink to other PDF
PostPosted: Thu Oct 05, 2017 10:15 pm 
Offline

Joined: Thu Oct 05, 2017 2:27 pm
Posts: 1
Hi,

I'm trying to add links to external PDF files (possibly relative to the path where the linking PDF is located) to a PDF file created with MigraDoc GDI+ 1.50.4619-beta4c but the links don't work. If I open the created file in Acrobat, edit a link but let it point to the same file, it works. In Acrobat (Tools->Add or Edit Link) I cannot see any difference and if I open both files in an editor, even the link code
"/A <</Type/Action/S/Launch/F<</Type/Filespec/F(c:/temp/test1.pdf)>> >>".
is identical in both files.

What am I doing wrong?

Here is my C# code:
paragraph = section.AddParagraph();
Hyperlink hyperlink = new Hyperlink();
hyperlink.AddText("Link");
hyperlink.Name = @"c:/temp/test1.pdf";
hyperlink.Type = HyperlinkType.File;
paragraph.Add(hyperlink);

using
hyperlink.Name = @"file:///c:/temp/test1.pdf";

gives the same results.

Regards

Gerhard


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 165 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