2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Tigran Aivazian
85a97a641b Cleanups to extr.c and pdfattach
1. In extr.c the error message should use the correct full pathname, not
the base filename.
2. In pdfattach the check for existence of input files should be
replaced with the check for read access to them.
2012-10-24 23:22:21 +01:00
Tigran Aivazian
be1996d0a0 Use tabs not spaces for indenting. 2012-10-24 16:23:16 +01:00
Tigran Aivazian
0feb47335f Handle absolute attachment pathnames
We must use only the basename part of the embedded attachment filename,
because the directories used in the path on the machine where the
attachments were created may not even exist on the machine where they
are extracted.
2012-10-24 14:13:12 +01:00
Tigran Aivazian
cbada0f8ef Correct the comment.
The global variable "doc" is actually shared by ALL functions, so the
old comment was incorrect.
2012-10-24 11:48:20 +01:00
Tigran Aivazian
ff96c601f1 Support for extracting attachments from PDF file
This commit adds Alt-S command which invokes the external utility "extr"
passing it the full pathname of the open PDF file and the current page
number. The utility extracts all attachments on this page (if there are
any) and saves them in the same directory as the PDF file. The file
names given to attachments are decoded from within the PDF file itself,
i.e. they are the same as the original file names of the files embedded
in the PDF.
2012-10-24 11:24:05 +01:00