Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to open local files using Launch action instead of URI action #929

Closed
dvilchez opened this issue Aug 29, 2019 · 3 comments
Closed

Comments

@dvilchez
Copy link

As far as I know, currently the way to open local files is using a relative path and omitting the baseURL parameter #466 and #467 but, it doesn't work. WeasyPrint uses always the URI action and many viewers are not able to open the files (Foxit Reader, MacOS Preview) and in the case of Acrobat Reader the user have to accept to warnings before accessing to the file.
2019-08-29 at 17 31

link_type, link_target, rectangle = link

According to the standard the right way to open a local files is using the Launch action:
2019-08-29 at 17 24

Cairo also support this option with File Links https://www.cairographics.org/manual/cairo-Tags-and-Links.html#file-link

I don't know enough about the WeasyPrint code-base to propose a solution but I would like to hear some opinions and ideas.

Regards,

@Tontyna
Copy link
Contributor

Tontyna commented Aug 29, 2019

Quoting the Cairo manual you linked (emphasis mine):

file : File name of PDF file to link to.

@liZe
Copy link
Member

liZe commented Sep 4, 2019

file : File name of PDF file to link to.

Yes, it only works with PDF files. Cairo uses the "GoToR" action, not "Launch" for that.

If the feature is not in Cairo, I'm afraid we can't do anything… I didn't know that it doesn't work for many PDF readers, because it perfectly works for mine (Evince).

@liZe
Copy link
Member

liZe commented Sep 13, 2019

As there's no solution, I think that I can close this issue. Please let me know if there's a way to do this, other than using something different from Cairo.

@liZe liZe closed this as completed Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants