1
/* $Header: /home/cvsroot/dvipdfmx/src/dpxconf.c,v 1.4 2009/05/10 16:39:53 matthias Exp $
3
This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
5
Copyright (C) 2002-2003 by Jin-Hwan Cho and Shunsaku Hirata,
6
the DVIPDFMx project team <dvipdfmx@project.ktug.or.kr>
8
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
36
const struct paper paperspecs[] = {
37
{"letter", 612.00, 792.00},
38
{"legal" , 612.00, 1008.00},
39
{"ledger", 1224.00, 792.00},
40
{"tabloid", 792.00, 1224.00},
41
{"a6", 297.638, 419.528},
42
{"a5", 419.528, 595.276},
43
{"a4", 595.276, 841.890},
44
{"a3", 841.890, 1190.550},
46
* The B series paper formats were first introduced in Japanese
47
* patch (jpatch). The size of b6, ..., b5var paper is JIS paper
48
* size for this reason. Please modify the following line or use
49
* libpaper if you need ISO paper sizes.
51
#if defined(USE_ISO_PAPERSIZE) || defined(ISO_PAPERSIZE)
52
{"b6", 354.331, 498.898},
53
{"b5", 498.898, 708.661},
54
{"b4", 708.661, 1000.630},
55
{"b3", 1000.630, 1417.320},
57
{"b6", 364.25, 515.91},
58
{"b5", 515.91, 728.50},
59
{"b4", 728.50, 1031.81},
60
{"b3", 1031.81, 1457.00},
61
{"b5var", 515.91, 651.97},
62
#endif /* USE_ISO_PAPERSIZE */
63
/* Alias for JIS and ISO */
64
{"jisb6", 364.25, 515.91},
65
{"jisb5", 515.91, 728.50},
66
{"jisb4", 728.50, 1031.81},
67
{"jisb3", 1031.81, 1457.00},
68
{"isob6", 354.331, 498.898},
69
{"isob5", 498.898, 708.661},
70
{"isob4", 708.661, 1000.630},
71
{"isob3", 1000.630, 1417.320},
77
paperinfo (const char *ppformat)
79
const struct paper *ppinfo;
84
ppinfo = paperfirst();
85
while (ppinfo && papername(ppinfo)) {
86
if (!strcmp(ppformat, ppinfo->name))
87
/* ppinfo->name == papername(ppinfo), but gcc doesn't like the latter */
89
ppinfo = papernext(ppinfo);
92
return ((ppinfo && papername(ppinfo)) ? ppinfo : NULL);
95
#endif /* HAVE_LIBPAPER */
101
const struct paper *ppinfo;
102
ppinfo = paperfirst();
103
while (ppinfo && papername(ppinfo)) {
105
wd = paperpswidth (ppinfo);
106
ht = paperpsheight(ppinfo);
107
fprintf(stdout, "%s: %.2f %.2f (%.2fmm %.2fmm)\n",
108
papername(ppinfo), wd, ht, 25.4 * wd / 72.0, 25.4 * ht / 72.0);
109
ppinfo = papernext(ppinfo);