2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Tigran Aivazian
8245017078 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-31 22:29:10 -04:00
Tigran Aivazian
52e7bb867e Use tabs not spaces for indenting. 2012-10-31 22:21:25 -04:00
Tigran Aivazian
d90b01dbfd 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-31 22:20:24 -04:00
Tigran Aivazian
ff23916940 Correct the comment.
The global variable "doc" is actually shared by ALL functions, so the
old comment was incorrect.
2012-10-31 22:19:54 -04:00
Tigran Aivazian
fc20c0af26 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.

Conflicts:

	pdfreader.lua
2012-10-31 22:19:39 -04:00