logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
CSHinUK  
#1 Posted : Wednesday, November 22, 2017 1:41:44 AM(UTC)
Quote
CSHinUK

Rank: Newbie

Groups: Registered
Joined: 11/22/2017(UTC)
Posts: 4
United Kingdom
Location: Newcastle

Thanks: 2 times
I need links between PDF documents to work with the WPF PDFium control. I'm creating MS Word 2010 documents with hyperlinks to other PDF documents. I'm then saving the documents as PDFs and then testing the links using Adobe Reader which work fine.

However when I then test the PDF documents in the WPF PDFium control the two events are not firing and the link inside the document does not work.

Should the steps I've taken work? Any other assistance would be appreciated.

Paul Rayman  
#2 Posted : Wednesday, November 22, 2017 3:45:43 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
Could you please provide the PDF document?
CSHinUK  
#3 Posted : Wednesday, November 22, 2017 3:50:05 AM(UTC)
Quote
CSHinUK

Rank: Newbie

Groups: Registered
Joined: 11/22/2017(UTC)
Posts: 4
United Kingdom
Location: Newcastle

Thanks: 2 times
pdflink.zip (258kb) downloaded 43 time(s).

Files attached, thanks
Paul Rayman  
#4 Posted : Wednesday, November 22, 2017 4:16:00 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
well... I have checked and everything works fine.
could you please create a simple app where this issue is reproduced?
I will check it on my side.
thanks 1 user thanked Paul Rayman for this useful post.
CSHinUK on 11/22/2017(UTC)
CSHinUK  
#5 Posted : Wednesday, November 22, 2017 5:20:01 AM(UTC)
Quote
CSHinUK

Rank: Newbie

Groups: Registered
Joined: 11/22/2017(UTC)
Posts: 4
United Kingdom
Location: Newcastle

Thanks: 2 times
I've created in a stand alone application and able to replicate the issue. Then I was looking at the properties we set on the viewer and it is because we have this set:

pdfViewer.MouseMode = MouseModes.PanTool;

We set this because most of our users will be using it with a touch screen.

Is there anyway around this or do we need to provide tool buttons to switch between pan and normal behaviour?






PataAndrey  
#6 Posted : Wednesday, November 22, 2017 5:57:10 AM(UTC)
Quote
PataAndrey

Rank: Member

Groups: Registered
Joined: 11/3/2017(UTC)
Posts: 7

Was thanked: 1 time(s) in 1 post(s)
Hi!

In this mode (PanTool), interactive things like clicking on links, highlighting text, etc. do not work.
thanks 1 user thanked PataAndrey for this useful post.
CSHinUK on 11/22/2017(UTC)
fmotsch  
#7 Posted : Wednesday, July 18, 2018 5:46:52 AM(UTC)
Quote
fmotsch

Rank: Member

Groups: Registered
Joined: 2/6/2018(UTC)
Posts: 11
France
Location: Paris

Thanks: 6 times
Hello,

Could we have some clues or a bit of algorithm to illustrate how to use BeforeLinkClicked & AfterLinkClicked when a link has been clicked...?
The goal here is to centered the clicked word on the other page. It goes on the selected page by itself but i'ven't got a clue on how to get the word coordinates... Some help would be appreciated !

Thnx !

Edited by user Wednesday, July 18, 2018 6:00:25 AM(UTC)  | Reason: Not specified

Paul Rayman  
#8 Posted : Thursday, July 19, 2018 4:14:06 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
Could you please provide PDF document with such links?
fmotsch  
#9 Posted : Saturday, July 21, 2018 6:33:48 AM(UTC)
Quote
fmotsch

Rank: Member

Groups: Registered
Joined: 2/6/2018(UTC)
Posts: 11
France
Location: Paris

Thanks: 6 times
here is an example : TestHyperlinks.pdf (433kb) downloaded 26 time(s).

There are severals hyperlinks in the PDF. they works perfectly with Acrobat Reader.
I was able to develop a piece of code which should do that but it seems that the destination coordinates are missing in your methods. I’m actually looking for something like : e.Link.Destination.rect.top and e.Link.Destination.rect.left.
But it doesn’t seems to exist.
Is there an other way around to get the coordinates i need ?

Edited by user Tuesday, July 24, 2018 12:04:55 AM(UTC)  | Reason: Not specified

Paul Rayman  
#10 Posted : Wednesday, July 25, 2018 2:13:25 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
Hi,

Did you saw these topics?
https://forum.patagames....rk-and-Named-Destination
https://forum.patagames....he-Destination-of-a-Link

in your case you may get additional info about destination like shown below
Code:
        private void PdfViewer1_BeforeLinkClicked(object sender, Patagames.Pdf.Net.EventArguments.PdfBeforeLinkClickedEventArgs e)
        {
            var array = Patagames.Pdf.Net.BasicTypes.PdfTypeArray.Create(e.Link.Destination.Handle);
        }


The detailed info about this array can be found here
https://www.adobe.com/co...fs/pdf_reference_1-7.pdf
on a page 582. Table 8.2
thanks 1 user thanked Paul Rayman for this useful post.
fmotsch on 7/25/2018(UTC)
fmotsch  
#11 Posted : Wednesday, July 25, 2018 5:06:42 AM(UTC)
Quote
fmotsch

Rank: Member

Groups: Registered
Joined: 2/6/2018(UTC)
Posts: 11
France
Location: Paris

Thanks: 6 times
Thank you so much, you are The Man :)
Quick Reply Show Quick Reply
Users browsing this topic
Guest (3)
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.