Jonathan (by email, see below) suggests to use locale to determine default paper size, rather than assuming A4. This seems a good idea, but I have no idea how robust or portable it would be. I would welcome any comments.
I have made it easy anyway with pdfjam to specify the default paper size (via pdfjam.conf), and to change the size on the fly. So this does not seem to be high priority work, for me anyway.
Date: Mon, 16 Nov 2015 17:40:46 -0500
From: Jonathan
To: "Firth, David"
Subject: Re: pdfjam default paper size from locale?
On Linux, at least, "locale -k LC_PAPER" will tell you the width and height
(in millimeters) of the locale's default paper size. For me:
$ locale -k LC_PAPER
height=279
width=216
paper-codeset="UTF-8"
$ dc
Jonathan (by email, see below) suggests to use locale to determine default paper size, rather than assuming A4. This seems a good idea, but I have no idea how robust or portable it would be. I would welcome any comments.
I have made it easy anyway with
pdfjam
to specify the default paper size (via pdfjam.conf), and to change the size on the fly. So this does not seem to be high priority work, for me anyway.Date: Mon, 16 Nov 2015 17:40:46 -0500 From: Jonathan To: "Firth, David" Subject: Re: pdfjam default paper size from locale?
On Linux, at least, "locale -k LC_PAPER" will tell you the width and height (in millimeters) of the locale's default paper size. For me:
$ locale -k LC_PAPER height=279 width=216 paper-codeset="UTF-8" $ dc
In comparison, for Brits:
$ LC_ALL=en_GB.utf-8 locale -k LC_PAPER height=297 width=210 paper-codeset="UTF-8" $
You could try that (if the user hasn't explicitly set the paper size) and fall back on A4 if it doesn't work.