Bug 295567 - Add ability to view embedded PDF files
Summary: Add ability to view embedded PDF files
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 23:46 UTC by Christoph Feck
Modified: 2016-03-23 06:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2012-03-08 23:46:49 UTC
There are PDF documents which, when opened, show a "This documents contains embedded files." message. These embedded files are indeed PDF files (file name ends in ".pdf"), but the only thing I can do is save them.

It should be possible to view them directly, without having to save and load them temporarily.

For example files, see http://www.standardsicherung.schulministerium.nrw.de/abitur-gost/fach.php?fach=2 (scrolling to the bottom, has four "2011" documents).
Comment 1 Denis Bitouzé 2012-04-23 16:17:22 UTC
IMHO, this shouldn't apply to PDF files only: all the embedded files in a PDF should be able to be open directly in Okular, with the software that relies on their MIME type (configured in KDE or whatever desktop manager). Currently, you have to save them first and to open them with another tools (command line or file manager).

Thanks!

Best regards.
Comment 2 Christoph Feck 2015-11-04 20:51:35 UTC
Updated link:

https://www.standardsicherung.schulministerium.nrw.de/abitur-gost/fach.php?fach=2

click on "Beispielaufgaben für den 2. Prüfungsteil" - [PDF, 4.2 MB] - 27.10.2015

the URL is currently https://www.standardsicherung.schulministerium.nrw.de/abitur-gost/getfile.php?file=3977
but this can change again.
Comment 3 Daniel Lichtenberger 2016-03-12 08:57:35 UTC
A "View file" button really improves the experience of working with embedded files.  I  posted a patch to https://git.reviewboard.kde.org/r/127351/ that adds a view button for any embedded file (not just PDF).
Comment 4 Denis Bitouzé 2016-03-12 16:53:52 UTC
Many thanks for your effort, Daniel! Unfortunately, I have no idea how to test your patch and currently not the time to investigate.
Comment 5 Albert Astals Cid 2016-03-23 00:59:43 UTC
Git commit 155dc14b55f8f02c72038abb4b4c6db3daa28b81 by Albert Astals Cid, on behalf of Daniel Lichtenberger.
Committed on 23/03/2016 at 00:58.
Pushed by aacid into branch 'Applications/16.04'.

Added ability to view embedded files

The selected embedded file(s) are extracted to QDir::tempPath() and the
default application associated with the file type is launched with KRun.

Double-click on an embedded file also launches the view action.

The temporary files are cleaned up automatically when the dialog is
closed.

REVIEW: 127351

M  +53   -1    ui/embeddedfilesdialog.cpp
M  +6    -0    ui/embeddedfilesdialog.h
M  +8    -5    ui/guiutils.cpp
M  +2    -0    ui/guiutils.h

http://commits.kde.org/okular/155dc14b55f8f02c72038abb4b4c6db3daa28b81
Comment 6 Denis Bitouzé 2016-03-23 06:43:16 UTC
Thanks!