[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Peace Everybody (Postscript???)
- From: "Dipl.-Ing. Uwe Koloska" <koloska Rcs1 urz tu-dresden de>
- To: gtk-app-devel-list redhat com
- Subject: Re: Peace Everybody (Postscript???)
- Date: Tue, 10 Aug 1999 01:02:10 +0200
On Don, 05 Aug 1999 wrote the famous Chayim I. Kirshen:
> Actually, my goal is rather simple. I am creating a small billing program for
> my personal use (obviously, to be released in Open-Source for the rest of the
> world if they should want it). I need to find a way to print the contents of
> my window on paper. Other then the menubar, the windows contents will be a
> series of boxes, a jpeg/gif, and some text. Ideas?
>
(Just returned from my holidays :-)))
I think you are mixing concepts! When you get some data from the user and want
to make a printout there are two ways:
1. the abstract way:
you only get the rough data from the user and then render it internally to
get a nice looking printout. You can make a Postscript/(La)TeX/ASCII
template and fillout the gaps -- maybe you want some preview. I call it
abstract, cause the user fills out an dialog that does not show the
graphical representation.
As others stated, it is not that difficult to write postscript espacially if
you only need characters and lines (and what else would you have on a
receipt?)
But it is also possible to use a "real" DTP-program to make the template,
marking the gaps with unusal strings and replace them with your data. --
It's not that difficult.
2. the WYSIWYG way:
make a graphical representation of your receipt with the help of the canvas
(or g-print / libart, if you are using gnome) and let the user fill the data
directly into this graphical representation (maybe gtktext is enough...) and
translate it to postscript/(La)TeX/ASCII (or just print it with gnome)
Since you possibly don't need any complex graphics the translation to
postscript will be very easy -- just take the same code as for doing the
canvas graphics and replace the canvas commands with postscript ones.
Maybe I better call it quasi-WYSIWIG, cause it possibly don't uses the same
fonts ... -- but this isn't that important, isn't it?
IMHO the first way is best suited for your problem (and easier to
implement;-)) -- and it is the better way! Then you can have a dialog that is
best for screen and arrange the data on a sheet of paper just the way it is
best for making a printout.
BTW: I you make a screenshot, you have a lot of data -- this will be reduced
heavily by writing vector commands like in postscript (or just (La)TeX commands
or pure ASCII)
> Chayim
Uwe
--
mailto:koloska@rcs.urz.tu-dresden.de
http://rcswww.urz.tu-dresden.de/~koloska/
-- --
right now the web page is in german only
but this will change as time goes by ;-)
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]