Discussion:
unable to open image links in pdf
(too old to reply)
Chuck
2020-11-29 19:49:58 UTC
Permalink
I have a PDF with image links within that point to images stored in the
same folder as the PDF. Works fine on Win, but when opened in 18.04
using "Document Viewer", when I try and click on any of the images, I
get "Failed to execute child process “shotwell” (Permission denied)".
How do I get around this? Thanks.
Paul
2020-11-30 00:15:56 UTC
Permalink
Post by Chuck
I have a PDF with image links within that point to images stored in the
same folder as the PDF. Works fine on Win, but when opened in 18.04
using "Document Viewer", when I try and click on any of the images, I
get "Failed to execute child process “shotwell” (Permission denied)".
How do I get around this? Thanks.
Apparmor ?

https://askubuntu.com/questions/344834/evince-document-viewer-failed-to-execute-child-process-nemo-permission-deni

*******

And just for the record, what tool generated this PDF ?
Did you print from Firefox ? Did you use a website whacker
that converts an HTML tree into a series of PDF pages ?
(Microsoft uses a FOSS tool that does this, when it
removes portions of its document tree.)

PDF stands for Portable Document Format. This means,
to a certain extent, the multimedia content should
be carried on board in a static fashion. Want to play
a movie in a PDF ? Fine. Embed a stream object in a
format that all PDF players are required to support.

It's not a good idea to hyperlink all the JPG files
in a document, to some folder on the / somewhere on the
machine. That's bad design. The JPG files at least,
should all be inside the document, to make it *portable*.
Send a single PDF file to a friend ? They can read it,
without having the / examined for missing JPG files.

It is acceptable, to have http:// links embedded in the
PDF, and those will cause the web browser to open. Then,
have a preference in the PDF viewer, to be able to disable
those hyperlinks so they are not armed. For untrusted PDF
files downloaded from the Internet, you want both Javascript
and any other hyperlinking, to be *disabled*. Adobe made
a huge huge attack surface, and it's up to us to tamp
it down a bit.

And that's what the AppArmor appears to be doing.

Paul
Chuck
2020-11-30 00:49:04 UTC
Permalink
Post by Paul
Post by Chuck
I have a PDF with image links within that point to images stored in
the same folder as the PDF.  Works fine on Win, but when opened in
18.04 using   "Document Viewer", when I try and click on any of the
images, I get "Failed to execute child process “shotwell” (Permission
denied)". How do I get around this?  Thanks.
Apparmor ?
https://askubuntu.com/questions/344834/evince-document-viewer-failed-to-execute-child-process-nemo-permission-deni
*******
Wow, that seemed to do the trick, thanks! I literally looked for quite
some time but didn't come up with that one.
Post by Paul
And just for the record, what tool generated this PDF ?
Did you print from Firefox ? Did you use a website whacker
that converts an HTML tree into a series of PDF pages ?
(Microsoft uses a FOSS tool that does this, when it
removes portions of its document tree.)
The website was foreign, so I used Google Translate first to convert it
back to English, then printed it to a PDF from Chrome. When I then
tried to open the image links within the PDF, they wouldn't so I then
used Adobe Acrobat DC to edit each image link so that the links would be
referring to the image(s) in the same folder as the PDF, and not to the
external online links.

Opening the modified PDF on Win with Adobe Reader worked fine and when I
clicked on the image in the PDF, the saved image in the same folder
would open. Just wasn't happening on Ubuntu until your solution!
Post by Paul
PDF stands for Portable Document Format. This means,
to a certain extent, the multimedia content should
be carried on board in a static fashion. Want to play
a movie in a PDF ? Fine. Embed a stream object in a
format that all PDF players are required to support.
It's not a good idea to hyperlink all the JPG files
in a document, to some folder on the / somewhere on the
machine. That's bad design. The JPG files at least,
should all be inside the document, to make it *portable*.
Send a single PDF file to a friend ? They can read it,
without having the / examined for missing JPG files.
Yes, I was thinking about going back and just inserting the full sized
images instead of referring to the ones in the same folder. As the PDF
is now, I'd have to send the entire folder if shared with someone, good
point.
Post by Paul
It is acceptable, to have http:// links embedded in the
PDF, and those will cause the web browser to open. Then,
have a preference in the PDF viewer, to be able to disable
those hyperlinks so they are not armed. For untrusted PDF
files downloaded from the Internet, you want both Javascript
and any other hyperlinking, to be *disabled*. Adobe made
a huge huge attack surface, and it's up to us to tamp
it down a bit.
And that's what the AppArmor appears to be doing.
Thanks for your help, really appreciated.
Post by Paul
   Paul
Continue reading on narkive:
Loading...