[texworks] Wishlist for pdf previewer

Reinhard Kotucha reinhard.kotucha at web.de
Sun Sep 25 00:14:22 CEST 2011


On 2011-09-22 at 17:58:23 +0200, Stefan Löffler wrote:

 > Hi all,
 > 
 > as you may or may not know, Charlie and I are currently working on
 > an overhaul (you could also call it replacement) of the current pdf
 > viewer.  This means now is the perfect time to tell us what you
 > would like to see changed in the pdf viewer, so we can see what we
 > can do to implement them.
 > 
 > There are a few things that you don't need to bring up, however:
 >  - multipage/continuous view - that is up and running already
 >  - text selection - that is on our wishlist, but due to implementation
 > details in poppler not too easy to achieve. If we have the time, we
 > might look into how evince/okular/other poppler-based programs do it,
 > but it's unlikely that this makes it into the first version that we
 > bring to Tw
 >  - printing - this is highly platform dependent and independent of the
 > core pdf previewer code (which only deals with displaying things on the
 > screen), so not the primary target right now
 > 
 > Alright, so let's all work together to improve the pdf previewer.

First of all, I think that a multipage view is quite useful in order
to check whether right-hand pages have odd numbers (or even numbers in
Arabic or Hebrew documents), but I never understood what continuous
view is good for.  I find it rather anoying when PDF files turn it on.

I agree on what Phil Taylor already said about marquee zoom.  That's
what I'm using in Adobe Reader quite frequently.  Regarding the
magnifying glass, IMO it's useful too, but I propose a few
enhancements:

 * A frame should be drawn around the magnifying glass.  I discussed
   this with Jonathan already in The Hague but he had not enough time
   to implement it himself.

 * The magnified area should make use of the entire window, ATM it's
   clipped at page boundaries, even if the window is larger than a
   sheet.  But this is a minor issue, I don't know how difficult it is
   to implement.

 * If the magnifying glass is configured to have a rectangular shape,
   it would be nice if there are configurable rulers attached to its
   borders.  This was implemented in xdvi already.

 * The magnifying glass should work with a marquee-zoomed image as
   well. 

A situation where this is quite useful is if you have a letter head
made with M$ Word and you want to create one with TeX with the same
layout.  You have to determine the size of margins, line spacing, and
so on.  In order to get a useful resolution, it has to work in
combination with marquee zoom.  ATM there is nothing comparable in
Adobe Reader yet.

Default values for left and bottom rulers could be pt for short ticks
and pc for long ticks, and for right and top rulers mm for short ticks
and cm for long ticks.  It's best if it can be configured by a sript,
so that people can define medium ticks every 5mm or anything else, if
desired.

As you said before, there are some performance issues with large
magnification factors.  There are two possible ways: You can either
render the whole page at a higher resolution, or only those graphic
elements you need.  I suppose that in most cases the whole page is
rendered, which is quite slow at high resolutions, obviously.

Rendering the whole page makes sense in many cases, especially if the
magnified area can be changed, for instance by moving the magnifying
glass with the mouse.  However, rendering only a part of the page is
sensible if only a part is displayed already, for instance, if you
apply the magnifying glass on a marquee-zoomed image.

It's quite easy to determine the bounding box of each graphic element
in order to determine what has to be rendered at all.  I don't know
whether this is supported by poppler.  If not, it should better be
added there rather than to TeXworks itself.

To be more precise: The bounding box of a polygon can be determined
easily from its moveto and lineto parameters and the bounding box of a
Bézier curve can be determined from its control points.  One has to
take parameters like linewidth into account, of course.  The width of
glyphs can be determined from the PDF "widths array".  I don't know
whether there is a reliable way to determine the height of a glyph.
According to the specs, the font bounding box parameter within a Type1
font can contain zeroes only, under some cirumstances at least.

However, I think that adding the ability to render only a part of a
page to poppler could enhance its performance significantly.  The
advantages of adding it to poppler rather than to TeXworks itself are
that more developers are involved and that other programs benefit from
the enhancement as well.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the texworks mailing list