drawing up - seeking advice

John Pybus john.pybus@zoology.oxford.ac.uk
Tue, 30 Mar 2004 16:02:11 +0100


Olly Betts wrote:

>>>To get the Survex centreline in has usually involved some horrible hack
>>>using postscript printer drivers from Survex spooling to file which I
>>>then import into Xara. 
>>
>>that's not a hack - that's a perfectly sensible thing to do - print
>>postscript to a file and import.
> 
> Indeed - postscript is really an open specification vector drawing language
> rather than a language for talking to printers.  Some operating systems
> even use DisplayPostScript as the main way of drawing on screen (Mac OS X
> uses DisplayPDF which is closely related).

And Adobe Illustrator's native file format is (was?) just a structured 
form of postscript.  However using print drivers as an interchange 
format does have its disadvantages.  If they're don't follow a 
convention that the importing app can understand you're going to lose 
all the structure/layering that you'd expect of an interchange format. 
In fact, without wishing to denigrate .ps importing at all, I'd class it 
a hack myself ;-)

>>Not really, but someone really needs to add 'print current view' to aven,
>>and take the opportunity to use the OS printing system. Phil underwood got
>>vageuly inspired about this a couple of weekends ago. That would definately
>>improve people's lives.
> 
> Matt Ryan is also interested in doing this, though I think he's been a
> bit busy to have made much headway.
> 
> The best approach is probably to use the wxWindows printing framework
> (which uses the OS printing system).  Talking to the OS directly means
> you need to implement it for every platform yourself.
> 
> I've wondered about doing a "quick and dirty" version of this, which
> just calls printwin/printps/... with appropriate values to print the
> current view.  The only slightly tricky part is how to handle the scale
> - ideally you want to show allow the usual "Scale to fit on 1 page =
> 1:1800" "Please enter Map Scale = X:Y (default 1:500)" interaction, and
> that needs to happen in the printer driver (otherwise you can't easily
> show the scale to fit on 1 page).  But if we're happy for the printer
> driver to run in its own window, that can be arranged.

How hard would it be to add cropping to the print* apps?  If aven could 
generate the parameters to print the visible area on the screen, then to 
be honest, I'd be quite happy cut-n-pasting them into a separate shell 
to run printps (at least as a temporary measure until wxWindows printing 
happens).  I often wish to print just the view of the survey I've found 
by browsing within aven.  Even if the viewport were only approximate it 
would be a huge help.

Cheers,

John