Printing in Survex

Olly Betts olly@survex.com
Wed, 4 Sep 2002 22:10:26 +0100


On Fri, Jul 19, 2002 at 08:09:58AM +0100, Graham Mullan wrote:
> I agree that there are a number of ways of previewing printed files [...]
> but what I cannot do is exert any real control as to what the result
> looks like. [...] What do you do if it is not suitable?

Another problem with the current arrangement is that once you've select
the view you want to print in Aven, you must note down the angles, then
switch to the file manager or command line, run the printer driver, and
type those numbers back in, along with details of whether you want
station names, crosses, etc.  This is far from ideal.

Allowing printing from Aven (with previewing, etc) is the next thing
we're intending to start working on for Survex 1.2.

> I have just printed a copy of a plan which I want
> to fit on one A3 sheet. At the relevant scale, Aven insists that it
> will take 3 sheets of A4, not two, as I cannot alter either the layout
> of the information on the bottom of the sheet or the placement of the
> plan on the sheet.

I'm curious why it doesn't fit.  It should unless it's really close to
the size of the page (a small margin is allowed for on each side).

Or is it because of the info box in the bottom left corner?  If you turn
that off (with --raw), it doesn't currently notice and take advantage of
the extra space.  I'll fix that for 1.0.14 anyhow.

On Wed, Jul 17, 2002 at 01:49:27PM +1000, Michael Lake wrote:
> Adding print preview adds more code, more work for the developers,and
> more opportunity for bugs. 

It's actually the case that the current arrangement means a lot *more*
code than printing from Aven (with print preview, etc) would.

At present, there's equivalent but different code in Aven and the
printer drivers to read a 3d file into memory, allow control of whether
crosses, names, legs, surface legs, etc should be drawn, and various
other tasks.  And there are annoying differences - e.g. I can't print
out a view with entrances marked specially, or with non-overlapping
labels (though I can look at a view with these on screen).

There's also 5 different bits of code for driving different sorts of
printers (MS Windows printers, Postscript, HP PCL, Epson ESC/P, and HPGL
plotters).

With printing from Aven, wxWindows provides a framework which means that
mostly the code needed to draw in a window can just be reused, as can
all the controls for selecting what gets drawn.  And we can get rid of
most of the backends (it might perhaps be useful to adapt the Postscript
backend to allow export of EPS, and keep an option to export as HPGL for
plotters - I need to investigate whether there's a need for these, or if
they can be accomplished as well or better via a revised printing system).

Cheers,
Olly