emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Viewing PDFs as text?


From: Phil Jackson
Subject: Re: Viewing PDFs as text?
Date: Wed, 12 Mar 2008 09:54:27 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Tassilo Horn <address@hidden> writes:

>> When trying to view a PDF with in a tty, `doc-view-initiate-display'
>> throws an error about missing support for image, png or other
>> utilities.
>>
>> Maybe it would be better to display the output of pdftotext directly
>> in a tty.  In X Window, the default behavior would be to display the
>> image when images are supported, and to fall back on pdftotext when
>> not.
>
> That would be the ideal behavior.  But looking at the code it seems
> quite hard to do, especially if you want to keep most/all of doc-view's
> features.
>
> What could be done was to open a separate buffer (in fundamental-mode)
> that displays the output of pdftotext.  I'll give that a try.

How about a generic 2txt mode that could use any of the 2txt (odt, ods,
xls, doc, pdf, ps, ...) tools and do the right thing? Something like:

("\\.\\(pdf\\|xls\\|..." . 2txt-mode) in the auto-mode-alist and then
the mode uses the correct tool depending on the extension.

Cheers,
Phil
-- 
 Phil Jackson




reply via email to

[Prev in Thread] Current Thread [Next in Thread]