emacs-devel
[Top][All Lists]
Advanced

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

Re: doc-view.el --- View PDF/PostScript/DVI files in Emacs


From: David Kastrup
Subject: Re: doc-view.el --- View PDF/PostScript/DVI files in Emacs
Date: Sun, 26 Aug 2007 22:38:47 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
> Hi David,
>
>>> I changed doc-view.el so that it uses plain ghostscript (plus dvipdfm
>>> for DVI files) which gives good results and is about ten times faster
>>> than with ImageMagick's convert.
>>>
>>> The only downside is that I don't know how to cut off the margins.
>>> Those waste a lot of buffer space when displaying the image.
>>> converts -trim option was very nice for that cause.  Do you know how
>>> one can do that with ghostview?
>>
>> Well, that is one of the things done in preview-latex.  Do you have
>> the bounding box information for your images (preview-latex takes them
>> from TeX usually)?
>
> No, how should I get it?  I only have PDF/PS or DVI files with no
> sources at all.

I am afraid I can't figure out what you are trying to achieve.  PDF/PS
and DVI files are primarily page-oriented formats.  It does not make
sense to display every page with a different size.  PDF and PS files
can actually change the page format in midstream _if_ that is desired.
Autocropping will complicate the user's handling of page material.
This is different if we are talking about embedded material, graphics
and stuff.  In that case, we will be using PDF (which sets its own
page size) or EPS.  EPS files carry a bounding box comment: extracting
that and using it for setting the rendering bounding box for
Ghostscript should do the trick.

preview-extract-bb in AUCTeX's preview.el can be used for that
purpose.

> If it can be useful if everything I have is the plain document with
> no additional source or infos about included images, then I'll do
> it.
>
> So can it do that?

Can it do what?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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