Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2139 > unrolled thread

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

Started byluser- -droog <mijoryx@yahoo.com>
First post2014-12-27 23:43 -0800
Last post2015-01-09 10:15 +0100
Articles 6 — 4 participants

Back to article view | Back to comp.lang.postscript


Contents

  Does gs default to DIN A4 in non-US locales? luser- -droog <mijoryx@yahoo.com> - 2014-12-27 23:43 -0800
    Re: Does gs default to DIN A4 in non-US locales? jdaw1 <jdawiseman@gmail.com> - 2014-12-28 02:49 -0800
    Re: Does gs default to DIN A4 in non-US locales? Carlos <angus@quovadis.com.ar> - 2014-12-29 05:38 +0100
      Re: Does gs default to DIN A4 in non-US locales? luser- -droog <mijoryx@yahoo.com> - 2015-01-06 20:59 -0800
        Re: Does gs default to DIN A4 in non-US locales? Wilfried <Wilfried@invalid.invalid> - 2015-01-07 15:22 +0100
          Re: Does gs default to DIN A4 in non-US locales? Carlos <angus@quovadis.com.ar> - 2015-01-09 10:15 +0100

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

Fromluser- -droog <mijoryx@yahoo.com>
Date2014-12-27 23:43 -0800
SubjectDoes gs default to DIN A4 in non-US locales?
Message-ID<ae8e536c-8138-4957-b1f1-5f3c013336c9@googlegroups.com>
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?

[toc] | [next] | [standalone]


#2140

Fromjdaw1 <jdawiseman@gmail.com>
Date2014-12-28 02:49 -0800
Message-ID<31d9173d-77a1-43aa-8cce-6316a1a49234@googlegroups.com>
In reply to#2139
> 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

[toc] | [prev] | [next] | [standalone]


#2141

FromCarlos <angus@quovadis.com.ar>
Date2014-12-29 05:38 +0100
Message-ID<20141229053848.307beb07@samara.DOMA>
In reply to#2139
[luser- -droog <mijoryx@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.
-- 

[toc] | [prev] | [next] | [standalone]


#2145

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-01-06 20:59 -0800
Message-ID<8cd91a4a-d486-4dc1-8435-979e3901def2@googlegroups.com>
In reply to#2141
On Sunday, December 28, 2014 10:39:25 PM UTC-6, Carlos wrote:
> [luser- -droog <mijoryx@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.
> --

Awesome. Now the bonus question: what about on Ms Windows?

[toc] | [prev] | [next] | [standalone]


#2146

FromWilfried <Wilfried@invalid.invalid>
Date2015-01-07 15:22 +0100
Message-ID<d2cqaad4vdjogrp9962c2er964fso3kflf@4ax.com>
In reply to#2145
luser- -droog wrote:

> On Sunday, December 28, 2014 10:39:25 PM UTC-6, Carlos wrote:
> > [luser- -droog <mijoryx@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.
> > --
> 
> Awesome. Now the bonus question: what about on Ms Windows?

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

[toc] | [prev] | [next] | [standalone]


#2148

FromCarlos <angus@quovadis.com.ar>
Date2015-01-09 10:15 +0100
Message-ID<m8o67g$7tq$1@dont-email.me>
In reply to#2146
On 07/01/2015 15:22, Wilfried wrote:
>> On Sunday, December 28, 2014 10:39:25 PM UTC-6, Carlos wrote:
>>> [luser- -droog <mijoryx@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.
-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web