Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does gs default to DIN A4 in non-US locales?

35 views
Skip to first unread message

luser- -droog

unread,
Dec 28, 2014, 2:43:09 AM12/28/14
to
I've been trying to imagine the correct semantics for selecting
the default dimensions of the graphics for xpost. And the
obvious first question is: how does ghostscript do it?

So, does gs default to DIN A4 in non-US locales?
Where do you configure that kind of stuff?

jdaw1

unread,
Dec 28, 2014, 5:49:58 AM12/28/14
to
> Where do you configure that kind of stuff?

In the PostScript?

<< /PageSize [ 90000 127 div 2 sqrt sqrt 2 copy div 3 1 roll mul ] >> setpagedevice

Carlos

unread,
Dec 28, 2014, 11:39:25 PM12/28/14
to
[luser- -droog <mij...@yahoo.com>, 2014-12-27 23:43]
In Debian, at least, the system default is in /etc/papersize and
Ghostscript reads it from there.
--

luser- -droog

unread,
Jan 6, 2015, 11:59:11 PM1/6/15
to
Awesome. Now the bonus question: what about on Ms Windows?

Wilfried

unread,
Jan 7, 2015, 9:22:33 AM1/7/15
to
I think the answer given above is wrong.

The file
http://www.ghostscript.com/doc/9.15/Use.htm#Change_default_size
sais:
"You can change the installed default paper size on an installed version
of Ghostscript, by editing the initialization file gs_init.ps. This file
is usually in the Resource/Init directory somewhere in the search path.
See the section on finding files for details.

Find the line

% /DEFAULTPAPERSIZE (a4) def

Then to make A4 the default paper size, uncomment the line to change
this to

/DEFAULTPAPERSIZE (a4) def

For a4 you can substitute any paper size Ghostscript knows.

This supecedes the previous method of uncommenting the line % (a4) ....

Sometimes the initialization files are compiled into Ghostscript and
cannot be changed.
+------------------------------------------------------------------+
| On Windows and some Linux builds, the default paper size will be |
| selected to be a4 or letter depending on the locale." |
+------------------------------------------------------------------+

Regards
--
Wilfried Hennings
please reply in the newsgroup, the e-mail address is invalid

Carlos

unread,
Jan 9, 2015, 4:15:56 AM1/9/15
to
On 07/01/2015 15:22, Wilfried wrote:
>> On Sunday, December 28, 2014 10:39:25 PM UTC-6, Carlos wrote:
>>> [luser- -droog <mij...@yahoo.com>, 2014-12-27 23:43]
>>>> I've been trying to imagine the correct semantics for selecting
>>>> the default dimensions of the graphics for xpost. And the
>>>> obvious first question is: how does ghostscript do it?
>>>>
>>>> So, does gs default to DIN A4 in non-US locales?
>>>> Where do you configure that kind of stuff?
>>>
>>> In Debian, at least, the system default is in /etc/papersize and
>>> Ghostscript reads it from there.
>
> I think the answer given above is wrong.

Not really, but it is incomplete. Ghostscript sets the default paper
size using libpaper (http://pkgs.fedoraproject.org/cgit/libpaper.git/).
It is libpaper who provides GS with the default paper size. It looks in
some environments variables and configuration files, of which usually
only /etc/papersize is set.

> The file
> http://www.ghostscript.com/doc/9.15/Use.htm#Change_default_size
> sais:
> "You can change the installed default paper size on an installed version
> of Ghostscript, by editing the initialization file gs_init.ps. This file
> is usually in the Resource/Init directory somewhere in the search path.
> See the section on finding files for details.
>
> Find the line
>
> % /DEFAULTPAPERSIZE (a4) def
[...]

Yes, once the default paper size is determined using libpaper, you can
override it in gs_init.ps.
--


0 new messages