[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New PostScript Configuration Program
- Subject: New PostScript Configuration Program
- From: davidf(at)dfanning.com (David Fanning)
- Date: Mon, 10 Jan 2000 17:13:51 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17965
Well, I've finally done what I have been threatening to do
for a l-o-n-g time. I've written a replacement for my poorly
written, but often downloaded, PS_Form program for configuring
the PostScript device.
I know, I know, I'm late. Bob Mallozzi just published a new
PSConfig program a week or so ago, and Craig Markwardt has
had something better than PS_Form working for a long time.
But I thought, what the heck, I said I was going to do it,
so I'm going to do it...
So I did it. And it took me a long time. I think I've put
about 100 hours in on this thing so far, but to be fair I've
built a number of tools as I've gone along, which will
make subsequent programming efforts much easier. At least,
that's my theory. :-)
With this program, I am debuting a new idea: shareware.
I have wanted to make professional-quality programs available
to IDL users at low cost for some time. As you know, I make
a number of pretty good programs available for free on my
web page now. I'm planning to continue that practice. But
I would also like to make my best efforts available and I
feel like I can't give those away.
I'm not looking to get rich. In fact, just so you know,
here is how the back-of-the-envelope calculation is done
to set the price. Add up the number of hours I spend writing
the program, multiply by my usual consulting fee, then divide
by 10 percent of the people who have bought my book in the
past two years. What it comes down to is that I have to
sell about 200-300 copies to make it worthwhile. That seems
optimistic to me, but this is an experiment, after all.
So, this program, named FSC_PSConfig, is priced at $30.
I'm still working out the details of how the shareware
thing is going to work, but currently my idea is to make
widely available IDL save files of the programs that have
been crippled in some mildly annoying way. On payment of the
shareware fee, I will send you (or allow you to download, this
is still being determined) the source code for the programs.
This program, for example, doesn't allow you to set the
filename when you initialize the program (although you
can set it to anything you like later). The filename always
starts out "coyote.ps". Any reasonably competent programmer
will be able to beat this pathetic attempt to protect the
code in a matter of a couple of minutes. So the effort is
not to keep people from stealing the code, but to gently
remind people that someone--a real person--wrote the program.
What will you get in return? Three things come immediately
1. High-quality programs. You can judge for yourself, but I
see a lot of IDL programs in my line of work, and I think
this one ain't too bad. (At least on my machine. Please see
my plea for help below.)
2. 24-hour a day, 7-days-a-week customer support. (At least
to hear my wife tell it. But the truth is, I'm around a
3. A technical support person with a sense of humor and
an author who is perhaps just a little more anal than
necessary when it comes to quality.
That's it. I hope that is worth $30 to you.
Anyway, if you would like to try the program, you can
download an IDL save file from my web page. The program
is available in IDL 5.1x, IDL 5.2x and IDL 5.3 versions.
You should download the version appropriate for your IDL
Save the file as "fsc_psconfig__define.sav". Note the two underscore
characters in front of the word "define". Yes, this is an object,
but don't be frightened. It is *very* easy to use. :-)
In fact, I have included a test program, named PS_PLOTTER, in
the save file. To make a PostScript file using this new
FSC_PSConfig program, all you have to do is this:
IDL> Restore, 'fsc_psconfig__define.sav'
IDL> PS_Plotter, Object=psObject
Those of your who prefer your PostScript output on A4 paper
and your units in centimeters as opposed to inches can set
the EUROPEAN keyword:
IDL> Restore, 'fsc_psconfig__define.sav'
IDL> PS_Plotter, Object=psObject, /European
The variable psObject now contains the FSC_PSConfig object.
If you want to see the graphical user interface again, you
can type this:
If you want to see the keywords that are used to configure the
PostScript device, you can type this:
IDL> Help, psObject->DeviceKeywords(), /Structure
The PostScript device is configured, and a PostScript file created,
by a sequence of commands similar to this:
psObject = Obj_New("FSC_PSConfig") ; Set the European keyword here, too.
IF cancelled THEN RETURN
thisDevice = !D.Name
thisFont = !P.Font
!P.Font = fonttype
Plot, Findgen(11), Title='This is an Example Plot'
!P.Font = thisFont
There are really many, many more features than I can
explain here. You can find complete program instructions,
including the source code to the PS_Plotter program that
exercises the FSC_PSConfig program, here:
Be sure to destroy the object when you are finished with it.
(Having it around in an IDL session, however, means you always
know how the PostScript device was last configured. And, incidentally,
you can have any number of these objects around, so each program
you write can have its own PostScript set-up.)
IDL> Obj_Destroy, psObject
I am doing some pretty sophisticated layout things in this program,
and so I am anxious to know how it looks and works on something
other than the Wintel machines. And I am not so naive as to think it
is yet bug-free. As always, I appreciate any and all feedback.
Just as a note, I am grateful indeed to Beau Leeger of RSI and
to Bob Mallozzi, who wrote the PSConfig program--which I studied
a LOT--for some very nice ideas that I took and extended a bit
in this program. I hope you feel, as I do, that people who copy
your ideas (but not your code!) are paying you the greatest respect. :-)
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: firstname.lastname@example.org
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155