PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 8:25 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Sep 20, 2010 4:52 pm 
Offline

Joined: Mon Sep 20, 2010 4:09 pm
Posts: 5
In html, here is a hyperlink that opens a new browser window: <a href="http://www.mypage.com" target="_blank">New Browser Window</a>. Note that target is an attribute of the anchor tag, and its value is set to "_blank".

I want to accomplish the same think in a PDF document, generated with the PDFSharp library.

So far, I've been able to create a hyperlink in PDF, but when I click on the link, the target loads in the same browser. Here's the code I'm using to create the hyperlink:

page.AddWebLink(
new PdfRectangle(new XPoint(x, y + 200), new XPoint(x + 500, y + 210)),
"http://www.mypage.com");

How do I make this link behave so that the target gets opened in a new browser window?

Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 22, 2010 2:53 pm 
Offline

Joined: Mon Sep 20, 2010 4:09 pm
Posts: 5
No one has answered my question.

I guess I should have asked this question first:

Using PdfSharp, is it possible to create a hyperlink (in a PDF document) that opens the target site in a new browser window?

Please advise.

Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 22, 2010 3:35 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
mleghorn wrote:
Using PdfSharp, is it possible to create a hyperlink (in a PDF document) that opens the target site in a new browser window?

I don't know.

Have you ever seen a PDF file that does this trick?
If so, where can we find it?

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 22, 2010 10:37 pm 
Offline

Joined: Mon Sep 20, 2010 4:09 pm
Posts: 5
Thomas Hoevel wrote:
mleghorn wrote:
Using PdfSharp, is it possible to create a hyperlink (in a PDF document) that opens the target site in a new browser window?

I don't know.

Have you ever seen a PDF file that does this trick?
If so, where can we find it?


Thanks, you answered my question. I realized that if I open the PDF from windows explorer, I'm not opening it in IE. Then when I click on a link in the PDF, the target site opens in a new browser. This works for me!


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

All times are UTC


Who is online

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