[jp] Address printing problem

Carlo Graziani carlo at oddjob.uchicago.edu
Mon Sep 5 13:06:19 EDT 2005

Colin Brough wrote: 
>>What about the option of sending printing through an external program the
>>way the email client Sylpheed does it?  I send my Sylpheed output to the
>>printer through enscript and can control the margins etc. as I need to.
> The whole problem is that the current PostScript output doesn't
> contain the DSC (Document Structuring Convention) comments and
> constraints that allow other programs to encapsulate it, reset
> margins, etc.
> The only thing I've thought of that might help would be to:
>  - save the jpilot output to a file (eg jpilot1.ps)
>  - run 'ps2ps' on it: ps2ps jpilot1.ps jpilot2.ps
>  - this gives you a file with an extra blank page on the end, but it
>    does at least now conform to the DSC; if you load this into 'gv'
>    you can mark the first page and then 'save marked pages' to get a
>    final 'jpilot3.ps' file which is what you wanted in the first
>    place...

Another alternative that is worth exploring is, export the calendar to
iCal format, and use another program to display and print it.

I've just done this, using "PHPiCalendar", a web application for sharing
(but not creating or editing) calendars over the web.  The advantage is
that you display the calendar with your web browser, and therefore print
it using the browser's PostScript engine, which -- in the case of Mozilla/
Firefox, at least -- is quite configurable and powerful.

Here's a quick summary of the process.  It is not necessarily optimal from
the point of view of file sharing, permissions, etc., but the required
tuning should be fairly obvious.  This is just a feasibility study.

The requirements are:  httpd and php.  If you run at home, and don't plan
to run a public web server, you should verify that your firewall blocks
ports 80 (http) and 443 (https) at least, before starting up httpd.

Download phpicalendar from 

Unpack the tarball in your home directory:
  'cd $HOME ; tar xzvf <download-dir>/phpicalendar-2.0c.tgz'

Start up j-pilot, go to Datebook, and export the datebook to an iCalendar
file, 'datebook.ics'.  Make sure the filename has an 'ics' extension.  Move
the file to $HOME/phpicalendar-2.0c/calendars (or export it there directly
from the export dialog).

Edit $HOME/phpicalendar-2.0c/config.inc.php.  Change the line

$default_cal 			= $ALL_CALENDARS_COMBINED;
$default_cal 			= 'datebook';

(note the single quotes).

Create (as root) a file called "phpicalendar.conf" in /etc/httpd/conf.d.  The
contents of the file should be:

# PHPiCalendar configuration
Alias /phpicalendar /your/home/directory/phpicalendar-2.0c

(Re)start httpd.  On many systems, this is done (as root) by
'/etc/init.d/httpd restart' or '/etc/init.d/httpd start' (depending on
whether httpd was already running).

Now fire up your web browser, and point it at


You should now be looking at your datebook, in PHPiCalendar's format. 
Change to some view that you like, and print what you see from the
browser's "Print" menu.

Future updates to your datebook can be viewed and printed by exporting
them from j-pilot in iCalendar format to the same directory as above.

This seems like a good calendar sharing option as well, so long as one
doesn't require that the web calendar be editable and that the edits be
synchronized with j-pilot or the PDA.



Carlo Graziani                                 (773) 702-7973 (Voice)
Department of Astronomy and Astrophysics       (773) 702-6645 (FAX)
University of Chicago                        carlo at oddjob.uchicago.edu
5640 South Ellis Avenue
Chicago, IL 60637            Vive Les Pommes Frites De La Liberte'!

More information about the Jpilot mailing list