[comp.sys.sun] pageview and dvi2ps

haberman@s1.msi.umn.edu (Joe Habermann) (06/05/91)

Many people on the net have asked lately why it is that when previewing
the output of dvi2ps under PageView, that the pages are not separated
and preview as a single smooshed glob.

A few people have correctly replied that in order for PageView to
figure out where pages break, that "%%Page n n" (or is it "%%Page n
n+1" ?) must be inserted before the start of pages.

I took a look at the PostScript being generated by dvi2ps (the version
that comes with psfig) and it turned out that it was putting in the
%%Page n n.  I also noticed that as the file went on, that n was
decreasing.  That that seemed odd until I remembered that dvi2ps by
default produces the pages in reverse order as most printers are set up
to stack ``in reverse'' so that the last page page printed is on the top 
of the stack.  My hunch was that perhaps the reverse order was confusing
PageView.  I then tried the -r option to dvi2ps so that the %%Page
numbers would be in ascending order.

This appears to solve the problem - somewhat.  It seems to work for the
most part.  I even included an imbedded PostScript file in my TeX
document using \psfig and PageView handled it correctly.  

If the direction of preview is changed (that is, you are previewing 
1, 2, 3 and then you go back to 2) then PV gets stuck trying to
execute @bop0 which it claims is undefined and displays a blank page.  
After that blank page, preview appears to resume correctly.  Maybe
someone else can take the problem from here.

Anyway, I hope this helps.

Joe Habermann
haberman@msi.umn.edu