Make file info more resilient
We shouldn't crash the whole KPV application just because for some
reason we can't obtain the valid unpacked size of the zip archive.
Make Space in FileChooser refresh the file list
The Space command in FileChooser should actually re-read the directory
and not just redraw the current (possibly stale) data. This is
especially useful in two situations:
1. You have extracted some attachments in the current directory
2. You wish to see the current state of the Last Documents list.
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.
Correct the comment.
The global variable "doc" is actually shared by ALL functions, so the
old comment was incorrect.
isolate doc settings of koptreader from pdfreader/djvureader
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.
Utility for attaching files inside PDF
This utility creates a PDF file containing specified files embedded into
it as attachments. The attachments can be extracted from the PDF file by
using extr utility.
I placed this in a separate "utils" directory to signify that this is
NOT intended to run on a Kindle (it requires pdfLaTeX to generate the
PDF file) but only on the desktop Linux workstation.
feedback zoom value used by page reflow
So that when zoom value exceed the upper limit of reflowable page size
user will notice that zoom value cannot be increased.
Make the pdfattach utility more robust
1. Handle filenames with spaces
2. Check if pdflatex and attachfile packages are installed before trying
to use them.
3. Use a more intuitive interface "pdfattach -o file.pdf file1.djvu
[file2.djvu]..." instead of forcing the user to specify "-i" option for
every input file.
Use tabs not spaces for indenting.
bugfix: dpi should be multiplied by shrink_factor not zoom
Enhance pdfattach script
1. Set the page size to 9x12cm as appropriate for Kindle 3
2. Together with each attachment print its base filename and file size
in bytes.
3. Print the total size of all attachments (so one can estimate whether
it is safe to extract the attachments or not).
Merge pull request #489 from chrox/kopt-isolated

bugfix: isolate doc settings of koptreader from pdfreader/djvureader and feedback zoom value used by page reflow
More enhancements to pdfattach
1. Emit the list of attached files first and then emit each individual
attachment one per page.
2. Use hyperlinks in the list of attached files so one can jump directly
to the file which he wants to extract.
Escape ampersand & in the filename also.
I am amazed what stupid filenames some people come up with, instead of
abiding by old good [a-zA-Z0-9] character set and 8.3 filename length...
Merge pull request #488 from tigran123/pdf-extract

Extract attachments from PDF file via Alt-S