REM2PDF(1)

NAME
rem2pdf - draw a PDF, SVG or PostScript calendar from Remind output

SYNOPSIS
    remind -pp [remind_options] file | rem2pdf [options] > output.pdf
    remind -pp [remind_options] file | rem2pdf --svg [options] > output.svg
    remind -pp [remind_options] file | rem2pdf --ps [options] > output.ps
    remind -pp [remind_options] file | rem2pdf --eps [options] > output.eps

DESCRIPTION
rem2pdf reads the standard input, which should be the results of running remind with the -p, -pp or -ppp options. It emits PDF, SVG or PostScript code that draws a calendar to standard output. (The addition of support for SVG and PostScript means that rem2pdf is increasingly misnamed...)

rem2pdf uses the Pango text formatting library (<https://pango.gnome.org/>) and the Cairo graphics library (<https://www.cairographics.org/>) to produce its output. The CPAN modules Pango (<https://metacpan.org/pod/Pango>) and Cairo (<https://metacpan.org/pod/Cairo>) are prerequisites.

rem2pdf assumes that its input stream is valid UTF-8. If this is not the case, it may render output incorrectly or even fail to render output at all.

OPTIONS

--ps
    Output PostScript instead of PDF.

--eps
    Output Encapsulated PostScript instead of PDF. In this case, you should feed "rem2pdf" only one month's worth of calendar data, because it cannot create a multi-page encapsulated PostScript file.

--svg
    Output SVG instead of PDF. In this case, you should feed "rem2pdf" only one month's worth of calendar data, because it cannot create a multi-page SVG file.

--landscape, -l
    Print the calendar in landscape orientation. Essentially, this swaps the width and height of the output media.

--small-calendars=n, -cn
    Control the inclusion of small calendars for the previous and next month. Possible values for n are:

    0   Do not draw any small calendars

    1   Place the small calendars at the bottom-right if there is room; otherwise, place them at the top-left.

    2   Place the small calendars at the top-left if there is room; otherwise, place them at the bottom-right.

    3   Place the previous month's small calendar at the top-left and the next month's at the bottom-right if there is room; otherwise, follow n=1. A moment's thought reveals that an option which splits the calendars if there is room and otherwise follows n=2 yields the same results.

--left-numbers, -x
    Draw the day numbers in the top-left corner of each day's box rather than the default top-right.

--fill-page, -e
    Make the calendar fill the available space on the page.

--avoid-overfull
    If a calendar box is going to overflow, try to make the entries fit by decreasing the font size. Using the --avoid-overfull option automatically enables the --fill-page option.

--media=media, -mmedia
    Specify the paper size (Letter, A4, etc.) For a list of valid media sizes, run:

        rem2pdf --media=help

    The default media size will be marked with an asterisk.

--width=n, -wn, --height=m, -hm
    Rather than specifying a named media size, directly specify the width and height of the output in 1/72ndths of an inch. You must specify both width and height for the options to be respected.

--title-font=font
    Specify the font used for the calendar title. It can be any font that the Pango library on your system can use. The default is Sans. If you choose a font with spaces in its name, you may need to quote this argument.

--header-font=font
    Specify the font used for the weekday names. The default is Sans.

--daynum-font=font
    Specify the font used for the day numbers. The default is Sans Bold Oblique.

--entry-font=font
    Specify the font used for calendar entries. The default is Sans.

--small-cal-font=font
    Specify the font used for the small next- and previous-month calendars. The default is Sans.

--title-size=n
    Specify the size of the title font in 1/72ndths of an inch. The default is 14. This size, and indeed all following sizes, may be specified as floating-point numbers.

--header-size=n
    Specify the size of the header font in 1/72ndths of an inch. The default is 14.

--daynum-size=n
    Specify the size of the day number font in 1/72ndths of an inch. The default is 14 for monthly calendars or 10 for weekly calendars. (Weekly calendars don't have day numbers in the calendar boxes, but this setting is used to scale the size of moon phase indicators.)

--entry-size=n
    Specify the size of the calendar entry font in 1/72ndths of an inch. The default is 8.

--border-size=n
    Specify the size of the blank border between the contents of a calendar box and the centre of the lines surrounding it, in 1/72ndths of an inch. The default is 4.

--entry-spacing=n
    Specify the amount of extra space, in 1/72ndths of an inch, to leave between calendar entries in a given calendar box. The default is one-half of the --border-size value.

--line-thickness=n
    Specify the thickness of the lines drawn on the calendar. The default is 1.

--margin-top=n
    The size of the margin at the top of the page in 1/72ndths of an inch. The default is 36.

--margin-bottom=n
    The size of the margin at the bottom of the page in 1/72ndths of an inch. The default is 36.

--margin-left=n
    The size of the margin at the left of the page in 1/72ndths of an inch. The default is 36.

--margin-right=n
    The size of the margin at the right of the page in 1/72ndths of an inch. The default is 36.

--line-color=RGB
    The color of the calendar grid lines. For this option and all following color options, the color may be specified as either 3 or 6 hex digits, specifying the R, G and B components respectively. For example, FFFFFF is white, FF0000 is a saturated red, and so on. If you supply 3 hex digits, then they are effectively doubled, so that (for example) 5AF is expanded to 55AAFF.

--title-color=RGB
    The color of the calendar title at the top of the page.

--header-color=RGB
    The color of the weekday names in the header row.

--daynum-color=RGB
    The color of the day numbers (and the moon phases, if any.)

--smallcal-color=RGB
    The color of the small monthly calendars, if any.

--bg-color=RGB
    The color of the page background.

    Note that all colors default to black (000) except for the page background, which defaults to no color at all (ie, transparent).

--title-url=URL
    Make the calendar title a link to URL. Note that no syntax checking is done on the URL; it's up to you to make sure it is valid.

--wrap, -y
    Modify the calendar so that if it would normally require 6 rows to print, then the last day (or last two days, as needed) are moved to the first row of the calendar, and adjust the small calendar positions as needed. This results in a calendar that only requires 5 rows, but with the last day or two appearing in the first row.

--weeks-per-page=n, -pn.
    This option is only used for weekly calendars. n is the number of weeks to print per page; it is an integer that can range from 1 to 4.

--verbose, -v
    Print (on STDERR) the name of the month and year for each month that is rendered.

--version
    Print the version of rem2pdf and exit.

--help
    Print a brief summary of rem2pdf usage.

USAGE
To use rem2pdf, pipe the output of remind with one of the -p, -pp or -ppp options into rem2pdf. The PDF output will be sent to standard output. So for example, to print a 12-month calendar for the year 2030, use:

  remind -pp12 /dev/null Jan 2030 | rem2pdf -e -l -c3 | lpr

You can concatenate multiple remind runs. For example, the following will produce a PDF calendar for January through March of 2023, and June of 2023 (for a total of four pages);

  (remind -pp3 /dev/null Jan 2023 ; \
   remind -pp /dev/null June 2023) | rem2pdf -e -l -c3 > cal.pdf

FORMATTED TEXT
rem2pdf supports a SPECIAL reminder type called PANGO. This lets you format text using the Pango markup language, described at <https://docs.gtk.org/Pango/pango_markup.html>. Here are some examples:

  REM Mon SPECIAL PANGO <b>Bold</b> and <i>italic</i>
  REM Tue SPECIAL PANGO <span face="zapf chancery">Fancy</span>
  REM Wed SPECIAL PANGO <span foreground="red"><b>Bold red</b></span>

Other back-ends such as rem2ps and rem2html will ignore PANGO special reminders.

Neither remind nor rem2pdf will check the markup to ensure it is syntactically correct. If you use invalid Pango markup, the Pango library will print a warning and rem2pdf will not render any output for the invalid reminder.

INFO STRINGS SUPPORTED
rem2pdf supports one INFO string, namely "Url". Its value should be a URL. If the "Url" INFO string is supplied for a normal reminder, a COLOR special, a MOON special, a PANGO special or a WEEK special, the corresponding output is turned into a hyperlink.

WEEKLY CALENDARS
rem2pdf will produce weekly calendars if you invoke remind with the -p+ option. the --weeks-per-page option specifies how many weeks' worth of reminders to print per page, and can range from 1 to 4.

ABSOLUTELY-POSITIONED TEXT
If your PANGO special reminder starts with "@x,y" where x and y are floating-point numbers, then the Pango marked-up text is positioned absolutely with respect to the day's box (and is not counted when calculating the box's height.)

A positive x value positions the left edge of the text x points to the right of the left side of the calendar box, while a negative x value positions the right edge of the text x points to the left of the right side of the calendar box.

A positive y value positions the top edge of the text y points below the top of the calendar box, while a negative y value positions the bottom edge of the text y points above the bottom of the calendar box. Note that the coordinates are relative to the center of the lines that delineate the boxes; you should use an x value whose absolute value is at least 2 and a y value whose absolute value is at least 4 to avoid colliding with the lines.

If you use absolutely-positioned text, it's up to you to make sure it doesn't overlap other text; rem2pdf takes no special precautions to prevent this.

As an example, this places Sunrise and Sunset times at the bottom left of each calendar box:

  REM SPECIAL PANGO @2,-4 <span size="4800"><i>Rise [sunrise($U)] Set [sunset($U)]</i></span>

(Note that Pango expresses font sizes in 1024's of a point, so a size of 4800 works out to about 4.6 points.)

AUTHOR
Rem2PDF was written by Dianne Skoll <dianne@skoll.ca>

HOME PAGE
<https://dianne.skoll.ca/projects/remind/>

SEE ALSO
remind, rem2ps, rem2html, tkremind