From: Juri Linkov <juri@jurta.org>
To: 8519@debbugs.gnu.org
Subject: bug#8519: 24.0.50; doc-view: allow pdftotext -layout instead of -raw
Date: Fri, 01 Jul 2011 00:57:45 +0300 [thread overview]
Message-ID: <87k4c33rqq.fsf@mail.jurta.org> (raw)
In-Reply-To: <87fwpf7w13.fsf@cyber.com.au> (Trent W. Buck's message of "Mon, 18 Apr 2011 19:23:36 +1000")
> doc-view supports using pdftotext on ttys.
> Unfortunately it is hard-coded to pass -raw.
> I would prefer to pass -layout.
>
> Please modify doc-view to allow me to support something like
>
> (setq doc-view-pdftotext-program-args '("-layout" "-nopgbrk"))
I came across the same need and found this bug report.
I think doc-view should also support other free software
that processes PDF files:
1. pdftk
pdftk is able to extract the PDF metadata (title, author, bookmarks, etc.),
e.g.
pdftk file1.pdf dump_data output file1.txt
So for a large PDF document, doc-view could present the
Table of Contents where the user can navigate to the selected page,
and then convert only displayed pages instead of all pages
that is terribly slow for a 1000-page document.
pdftk also can prepare the PDF text for editing in emacs.
From `man pdftk':
-compress useful when you want to edit PDF code
in a text editor like vim or emacs.
Uncompress PDF page streams for editing the PDF
in a text editor (e.g., vim, emacs):
pdftk doc.pdf output doc.unc.pdf uncompress
This feature could be used after typing `C-c C-c'.
Since pdftk is dependent on Java, doc-view should not require it
and should be able to detect the installed PDF processing programs
(with e.g. `(executable-find "pdftk")') and select one of them
according to the user's priority list.
2. A better program is `qpdf'. It has no problems mentioned above.
So doc-view should also detect the availability of
`(executable-find "qpdf")' as well and provide the same option for its
command line arguments (and use all features relevant to doc-view).
3. Using the PDF rendering library `poppler,' it's possible
to implement in Emacs a PDF viewer like `apvlv' for Vim.
next prev parent reply other threads:[~2011-06-30 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 9:23 bug#8519: 24.0.50; doc-view: allow pdftotext -layout instead of -raw Trent W. Buck
2011-06-30 21:57 ` Juri Linkov [this message]
2019-09-29 12:26 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4c33rqq.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=8519@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.