DEV Community

Wincent Balin
Wincent Balin

Posted on • Originally published at ofdigitalwater.postach.io on

1 2

Using pcal to create monthly calendars in landscape format

Would you like to have a monthly calendar, printed using DIN A4 landscape format, like this one?

If you would, there is a utility for creating such calendars, called pcal. If your preferred operating system is an incarnation of Windows, you may download executables from

http://pcal.sourceforge.net/

and run them on the command line with the options provided below. If your operating system of choice is Linux, most, if not all, major distributions will provide a corresponding package (in Ubuntu, just run sudo apt-get install pcal).

To create the calendar above, I simply ran these commands:

pcal -o june.ps -P a4 -M -F 1 -E
ps2pdf june.ps
Enter fullscreen mode Exit fullscreen mode

The first command, which runs pcal to produce the aforementioned calendar in Postscript format, uses a lot of options, which shall be explained:

  • -o june.ps This option lets the program write calendar into the file june.ps.
  • -P a4 specifies the paper size of DIN A4.
  • -M adds pictograms of Moon phases to the calendar.
  • -F 1 sets Monday as the first day of the week; usual for continental Europe.
  • -E further Europeanizes the calendar, setting date convention to, well, European day/month (instead of the American month/day).

Run as is, the command above produces calendar of the current month. To produce calendars for a specified month, add month year to the pcal command line (for example, 07 2013 for July of 2013).

You will need the second command only if you will copy the resulting calendar to systems, which may not have a Postscript-compatible printer. This command converts the calendar from Postscript into the Portable Document Format, more widely known by it's abbreviation, PDF. The program ps2pdf is a part of ghostscript package, which processes Postscript files.

Of course pcal does have many more options, but if you are content with the calendar at the beginning of this article, just use the commands above.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay