PdfEnableFileLinks / PdfFileNavigation

Discussions about document viewing.
Post Reply
JohnTodd
Posts: 6
Joined: Wed Jun 10, 2015 4:26 pm

PdfEnableFileLinks / PdfFileNavigation

Post by JohnTodd » Wed Jun 10, 2015 4:35 pm

I am having trouble getting notifications (events) when users click a File link in a displayed PDF.

I have tried it with several different PDF files (some manually created, some created with Adobe Pro, some created by our users).

All of the documents I try work fine (links activate) in Adobe Reader and FoxIt.

I am using GdPicture.NET.11 in WPF (evaluation). I am on Windows 8, using Visual Studio 2013, .NET 4.5.

I am setting:

GdViewer1.PdfEnableLinks = true;
GdViewer1.PdfEnableFileLinks = true;

GdViewer1.PdfFileNavigation += OnFileNavigation;
GdViewer1.PdfUriNavigation += OnUriNavigation;
GdViewer1.AnnotationClicked += OnAnnoClicked;

(I've also set these values in the XAML itself... but no change.)

When the doucment is loaded, it displays fine, but clicking the link never calls OnFileNavigation.

If I include WEB links (URI) in the document, OnUriNavigation is called without issue.

I have also modified the included WPF Document Viewer sample to include the above settings... but it does not work either.

What am I missing? Any thoughts on what I can do to help debug this issue?

Thanks, in advance.

-John

User avatar
Loïc
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PdfEnableFileLinks / PdfFileNavigation

Post by Loïc » Thu Jun 11, 2015 2:02 pm

Hello John,

Could you share the files you used?
If they contain confidential data just open a ticket here: http://support.gdpicture.com

With best regards,

JohnTodd
Posts: 6
Joined: Wed Jun 10, 2015 4:26 pm

Re: PdfEnableFileLinks / PdfFileNavigation

Post by JohnTodd » Thu Jun 11, 2015 2:52 pm

Hi Loic,

I have uploaded a test file here: https://dl.dropboxusercontent.com/u/893 ... 20File.zip

The PDF ("Manual Adobe Created.pdf") links to "C:\temp\Test File.txt".

It works fine in Adobe Reader.

I'm probably doing something very stupid (it's my hobby)... so again, thanks much for any help you can provide.

-John

JohnTodd
Posts: 6
Joined: Wed Jun 10, 2015 4:26 pm

Re: PdfEnableFileLinks / PdfFileNavigation

Post by JohnTodd » Thu Jun 11, 2015 4:03 pm

It seems that GdViewer may just not support Launch actions.

Using Resharper and glancing at the decompiled GdViewer code, I can find an implementation for PdfActionType.ActionTypeGoTo/GoToR/URI... but no implementation for PdfActionType.ActionTypeLaunch (which is what is generated by Acrobat Pro for file links).

User avatar
Loïc
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PdfEnableFileLinks / PdfFileNavigation

Post by Loïc » Thu Jun 11, 2015 4:54 pm

We've fixed that for the next minor!

Cheers,

Loïc

JohnTodd
Posts: 6
Joined: Wed Jun 10, 2015 4:26 pm

Re: PdfEnableFileLinks / PdfFileNavigation

Post by JohnTodd » Thu Jun 11, 2015 4:57 pm

Thanks so much for all your help Loic.

And I just have to say, this is probably the best support I've received for a software product in a long time. Not to mention that the product is far superior to the other image/PDF options we've looked at.

User avatar
Loïc
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PdfEnableFileLinks / PdfFileNavigation

Post by Loïc » Thu Jun 11, 2015 5:03 pm

Thank you very much for the return John. Feel free to open any other request, we would love to make our WPF controls even better!

Cheers,

Loïc

JohnTodd
Posts: 6
Joined: Wed Jun 10, 2015 4:26 pm

Re: PdfEnableFileLinks / PdfFileNavigation

Post by JohnTodd » Mon Jun 15, 2015 7:42 pm

Hi,

I updated to version 11.2.4 (June 15, 2015) from the website.

I still can't seem to get this to work.

I can see that handling of PdfActionType.ActionTypeLaunch was added, but I don't see where it is actually raising an event that I can get my hands on (so that I can process the file launch myself... for this application the file is actually stored on a server and needs to be retrieved before it can be opened, so I need an event if at all possible).

Also, it seems to fail silently if the target file can't be found, but I'm not entirely sure it's not finding the file or if something else is going on.

I may be misunderstanding how this is supposed to work.

-John

User avatar
Loïc
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PdfEnableFileLinks / PdfFileNavigation

Post by Loïc » Tue Jun 16, 2015 8:56 am

Hello John,

I just replied through the help desk.

"There is no event for ActionTypeLaunch handling. Basically, if the target file is not found, nothing is done.
That said, we will add an event into the next release to inform the caller of what is happening. This should be done within a couple of weeks."

Cheers,

Loïc

JohnTodd
Posts: 6
Joined: Wed Jun 10, 2015 4:26 pm

Re: PdfEnableFileLinks / PdfFileNavigation

Post by JohnTodd » Wed Jun 17, 2015 4:00 pm

Thank you Loic. I look forward to it.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests