.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "REM2PDF 1p"
.TH REM2PDF 1p 2024-04-29 "perl v5.38.2" "VERSION 04.03.07"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
rem2pdf \- draw a PDF calendar from Remind output
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\& remind \-pp [options] file | rem2pdf [options] > output.pdf
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
\&\fBrem2pdf\fR reads the standard input, which should be the results of
running \fBremind\fR with the \fB\-p\fR, \fB\-pp\fR or \fB\-ppp\fR options. It emits
PDF code that draws a calendar to standard output.
.PP
\&\fBrem2pdf\fR uses the Pango text formatting library ()
and the Cairo graphics library () to produce
its output. The CPAN modules Pango ()
and Cairo () are prerequisites.
.PP
\&\fBrem2pdf\fR 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.
.SH OPTIONS
.IX Header "OPTIONS"
.IP "\-\-landscape, \-l" 4
.IX Item "--landscape, -l"
Print the calendar in landscape orientation. Essentially, this swaps
the width and height of the output media.
.IP "\-\-small\-calendars=\fIn\fR, \-c\fIn\fR" 4
.IX Item "--small-calendars=n, -cn"
Control the inclusion of small calendars for the previous and next
month. Possible values for \fIn\fR are:
.RS 4
.IP 0 4
Do not draw any small calendares
.IP 1 4
.IX Item "1"
Place the small calendars at the bottom-right if there is room;
otherwise, place them at the top-left.
.IP 2 4
.IX Item "2"
Place the small calendars at the top-left if there is room; otherwise,
place them at the bottom-right.
.IP 3 4
.IX Item "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
\&\fIn\fR=1. A moment's thought reveals that an option which splits the
calendars if there is room and otherwise follows \fIn\fR=2 yields the
same results.
.RE
.RS 4
.RE
.IP "\-\-left\-numbers, \-x" 4
.IX Item "--left-numbers, -x"
Draw the day numbers in the top-left corner of each day's box rather than
the default top-right.
.IP "\-\-fill\-page, \-e" 4
.IX Item "--fill-page, -e"
Make the calendar fill the available space on the page.
.IP "\-\-media=\fImedia\fR, \-m\fImedia\fR" 4
.IX Item "--media=media, -mmedia"
Specify the paper size (Letter, A4, etc.) For a list of valid media sizes,
run:
.Sp
.Vb 1
\& rem2pdf \-\-media=help
.Ve
.Sp
The default media size will be marked with an asterisk.
.IP "\-\-width=\fIn\fR, \-w\fIn\fR, \-\-height=\fIm\fR, \-h\fIm\fR" 4
.IX Item "--width=n, -wn, --height=m, -hm"
Rather than specifying a named media size, directly specify the width
and height of the output in 1/72ths of an inch. You must specify both
width and height for the options to be respected.
.IP \-\-title\-font=\fIfont\fR 4
.IX Item "--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.
.IP \-\-header\-font=\fIfont\fR 4
.IX Item "--header-font=font"
Specify the font used for the weekday names. The default is Sans.
.IP \-\-daynum\-font=\fIfont\fR 4
.IX Item "--daynum-font=font"
Specify the font used for the day numbers. The default is
Sans Bold Oblique.
.IP \-\-entry\-font=\fIfont\fR 4
.IX Item "--entry-font=font"
Specify the font used for calendar entries. The default is Sans.
.IP \-\-small\-cal\-font=\fIfont\fR 4
.IX Item "--small-cal-font=font"
Specify the font used for the small next\- and previous-month
calendars. The default is Sans.
.IP \-\-title\-size=\fIn\fR 4
.IX Item "--title-size=n"
Specify the size of the title font in 1/72ths of an inch. The default
is 14. This size, and indeed all following sizes, may be specified as
floating-point numbers.
.IP \-\-header\-size=\fIn\fR 4
.IX Item "--header-size=n"
Specify the size of the header font in 1/72ths of an inch. The default is 14.
.IP \-\-daynum\-size=\fIn\fR 4
.IX Item "--daynum-size=n"
Specify the size of the day number font in 1/72ths of an inch. The
default is 14.
.IP \-\-entry\-size=\fIn\fR 4
.IX Item "--entry-size=n"
Specify the size of the calendar entry font in 1/72ths of an inch.
The default is 8.
.IP \-\-border\-size=\fIn\fR 4
.IX Item "--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/72ths of an inch.
The default is 4.
.IP \-\-line\-thickness=\fIn\fR 4
.IX Item "--line-thickness=n"
Specify the thickness of the lines drawn on the calendar. The default is 1.
.IP \-\-margin\-top=\fIn\fR 4
.IX Item "--margin-top=n"
The size of the margin at the top of the page in 1/72ths of an inch.
The default is 36.
.IP \-\-margin\-bottom=\fIn\fR 4
.IX Item "--margin-bottom=n"
The size of the margin at the bottom of the page in 1/72ths of an inch.
The default is 36.
.IP \-\-margin\-left=\fIn\fR 4
.IX Item "--margin-left=n"
The size of the margin at the left of the page in 1/72ths of an inch.
The default is 36.
.IP \-\-margin\-right=\fIn\fR 4
.IX Item "--margin-right=n"
The size of the margin at the right of the page in 1/72ths of an inch.
The default is 36.
.IP "\-\-wrap, \-y" 4
.IX Item "--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 \fIfirst\fR row.
.IP "\-\-verbose, \-v" 4
.IX Item "--verbose, -v"
Print (on STDERR) the name of the month and year for each month that
is rendered.
.SH USAGE
.IX Header "USAGE"
To use \fBrem2df\fR, pipe the output of \fBremind\fR with one of the
\&\fB\-p\fR, \fB\-pp\fR or \fB\-ppp\fR options into \fBrem2pdf\fR. The PDF output
will be sent to standard output. So for example, to print a 12\-month
calendar for the year 2030, use:
.PP
.Vb 1
\& remind \-pp12 /dev/null Jan 2030 | rem2pdf \-e \-l \-c3 | lpr
.Ve
.PP
You can concatenate multiple \fBremind\fR 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);
.PP
.Vb 2
\& (remind \-pp3 /dev/null Jan 2023 ; \e
\& remind \-pp /dev/null June 2023) | rem2pdf \-e \-l \-c3 > cal.pdf
.Ve
.SH "FORMATTED TEXT"
.IX Header "FORMATTED TEXT"
\&\fBrem2pdf\fR supports a \fBSPECIAL\fR reminder type called \fBPANGO\fR. This
lets you format text using the Pango markup language, described at
. Here are some
examples:
.PP
.Vb 3
\& REM Mon SPECIAL PANGO Bold and italic
\& REM Tue SPECIAL PANGO Fancy
\& REM Wed SPECIAL PANGO Bold red
.Ve
.PP
Other back-ends such as \fBrem2ps\fR and \fBrem2html\fR will ignore PANGO
special reminders.
.PP
Neither \fBremind\fR nor \fBrem2pdf\fR will check the markup to ensure
it is syntactically correct. If you use invalid Pango markup, the
Pango library will print a warning and \fBrem2pdf\fR will not render any
output for the invalid reminder.
.SH "ABSOLUTELY-POSITIONED TEXT"
.IX Header "ABSOLUTELY-POSITIONED TEXT"
If your \fBPANGO\fR special reminder starts with \f(CW\*(C`@\fR\f(CIx\fR\f(CW,\fR\f(CIy\fR\f(CW\*(C'\fR where \fIx\fR
and \fIy\fR 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.)
.PP
A positive \fIx\fR value positions the left edge of the text \fIx\fR points
to the right of the left side of the calendar box, while a negative
\&\fIx\fR value positions the right edge of the text \fIx\fR points to the left
of the right side of the calendar box.
.PP
A positive \fIy\fR value positions the top edge of the text \fIy\fR points
below the top of the calendar box, while a negative \fIy\fR value
positions the bottom edge of the text \fIy\fR points above the bottom of
the calendar box.
.PP
If you use absolutely-positioned text, it's up to you to make sure it
doesn't overlap other text; \fBrem2pdf\fR takes no special precautions to
prevent this.
.PP
As an example, this places Sunrise and Sunset times at the bottom left
of each calendar box:
.PP
.Vb 1
\& REM SPECIAL PANGO @1,\-1 Rise [sunrise($U)] Set [sunset($U)]
.Ve
.PP
(Note that Pango expresses font sizes in 1024's of a point, so a size of
4800 works out to about 4.6 points.)
.SH AUTHOR
.IX Header "AUTHOR"
\&\fBRem2PDF\fR was written by Dianne Skoll
.SH "HOME PAGE"
.IX Header "HOME PAGE"
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBremind\fR, \fBrem2ps\fR, \fBrem2html\fR, \fBtkremind\fR