Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'pcal - full-page calendars in Postscript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
pcal - full-page calendars in Postscript
Authored by: victory on Feb 16, '05 05:05:00AM
NOTE: This is the method I use to print out full-page calendars. However, I just want to state for the record that I appreciate the contribution of rael9's perl script and the willingness to share it with the rest of us. What follows is NOT an attempt to 'one-up' rael9's method -- it's just what I've been using for several years and I thought others might find it useful.


Basically, I use pcal, an open-source, cmd-line app that generates nice (graphics, fonts, shading, etc.) full-page calendars in Postscript. (pcal is written in C and thus you'll need to have the Apple Dev Tools installed and be familiar with how to compile apps from the Unix cmd line. However, it's a pretty simple app to build. I'm not aware of any pre-compiled OSX/Darwin binaries available on the web)

As mentioned, pcal creates calendars in Postscript. Thus if you happen to have a Postscript-compatible printer hooked up to your Mac (or Ghostscript installed) and want a calendar for July 2005, just type:

pcal 7 2005 | lpr

What if you don't have a Postscript printer? No problem, if you're running 10.3 or later. First create a Postscript file of the calendar page:

pcal 7 2005 > july.ps

then double-click on the july.ps file in the Finder (or use open july.ps) and it will automatically convert the Postscript file to a PDF and open it in the Preview app, from which you can then print the calendar as you would any other document.

Or if you're like me and want to do everything from the command line, try:

pcal 7 2005 | pstopdf -i -o /tmp/cal.pdf ; open -a Print\ Center /tmp/cal.pdf

NOTES:

  • pstopdf is a new command included with 10.3. See the man page for more details.
  • It would be really nice if the above sequence could be done entirely with pipes (without a temporary file), but pstopdf doesn't write to stdout, nor does open read from stdin. And the occasionally helpful trick of using - in place of a filename to indicate stdio doesn't work here. :-( Maybe someone else can figure out a way to do it with named pipes or something...
  • If you're going to give pcal a try, be sure to check out the numerous options it offers. For example, it gives you the ability to include miniature calendars for the previous and next month, phases of the moon, customizable date formats, and more.
  • In the examples shown, I actually have to specify pcal -X 20 , otherwise my printer (a HPLJ 6MP) chops off the edge of the calendar.
  • I can't quite explain why I prefer printing calendars from the cmd-line rather than simply using iCal. But it looks like I'm not the only one...


[ Reply to This | # ]