Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98861 - Request for USE flag to set default papersize in ghostscript
Summary: Request for USE flag to set default papersize in ghostscript
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-13 02:53 UTC by Roger Hill-Cottingham
Modified: 2006-01-31 12:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Hill-Cottingham 2005-07-13 02:53:08 UTC
ghostscript defaults to letter size paper, which is fine for many, but for
European users, A4 paper would be a better default. If we had a USE flag, say
"a4paper", that appled the following patch to ghostscript, I would be very
happy. The same flag could also be used for similar patches for other applications.


--- lib/gs_init.ps.orig 2005-03-31 15:03:05.000000000 +0100
+++ lib/gs_init.ps  2005-07-07 09:17:24.557900514 +0100
@@ -64,7 +64,7 @@
 systemdict /.languagelevel known not { /.languagelevel 1 def } if
 
 % Optionally choose a default paper size other than U.S. letter.
-% (a4) /PAPERSIZE where { pop pop } { /PAPERSIZE exch def } ifelse
+(a4) /PAPERSIZE where { pop pop } { /PAPERSIZE exch def } ifelse
 
 % Turn on array packing for the rest of initialization.
 true setpacking



Reproducible: Always
Steps to Reproduce:
1. Apply above patch to ghostscript
2.
3.

Actual Results:  
ghostscript uses a4 papersize as default


Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.3.4,
glibc-2.3.4.20040808-r1, 2.6.7-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.7-gentoo-r14 x86_64 AMD Opteron(tm) Processor 844
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.6.8.1-r2
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sfperms strict"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://ftp.belnet.be/linux/gentoo/
http://www.mirror.ac.uk/sites/www.ibiblio.org/
http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/
http://ftp.easynet.nl/mirror/gentoo/ http://ftp6.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://ftp.belnet.be/gentoo-portage/"
USE="amd64 X acpi alsa arts berkdb bitmap-fonts crypt curl esd f77 fam flac
font-server fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk guile imlib ipv6
jp2 jpeg kde libwww lzw lzw-tiff mikmod motif mozilla mp3 ncurses nls ogg opengl
oss pam pdflib perl png python qt readline sdl slang ssl tcltk tcpd tetex tiff
truetype truetype-fonts type1-fonts usb userlocales vorbis xine xml2 xmms xpm
xrandr xv zlib userland_GNU kernel_linux elibc_glibc"
Comment 1 Sandro Bonazzola (RETIRED) gentoo-dev 2005-07-13 03:01:18 UTC
I'can't see the point in adding a use flag when you can just set it in
/usr/share/ghostscript/7.07/lib/gs_init.ps or setting a default option in the
env var GS_OPTIONS.
Comment 2 Roger Hill-Cottingham 2005-07-13 03:45:39 UTC
(In reply to comment #1)
> I'can't see the point in adding a use flag when you can just set it in
> /usr/share/ghostscript/7.07/lib/gs_init.ps 

In which case I would need to (remember to) edit it every time gs was re-emerged

> or setting a default option in the env var GS_OPTIONS.

Hmm. Yes, I'd forgotten that one. My apologies. 

Comment 3 Sandro Bonazzola (RETIRED) gentoo-dev 2005-07-13 04:28:46 UTC
Ok, you can now close the bug  :-)
Comment 4 Roger Hill-Cottingham 2005-07-13 04:46:40 UTC
(In reply to comment #3)
> Ok, you can now close the bug  :-)

OK. Done. Sorry to waste your time.
Comment 5 Rune Schjellerup 2006-01-31 01:15:31 UTC
I used a good deal of time today figuring out why my output looked wrong.
It was of course because paper size wasn't set to A4.

For many users it's anoying to have to read through the documentation of every text procesing tool, to figure out how to set A4 papersize.

Couldn't there be made a way to set this a central place in gentoo.
Then all tools with these issues could adjust themselves on install according to this.

For instance ghostscript could set the appropriate option in GS_OPTIONS in some /etc/env.d/ file.
Comment 6 Rune Schjellerup 2006-01-31 01:22:21 UTC
You mention that GS_OPTIONS should be used to set the paper size.
Can you please help me figure out what to put in the variable?
Comment 7 Sandro Bonazzola (RETIRED) gentoo-dev 2006-01-31 12:15:30 UTC
(In reply to comment #6)
> You mention that GS_OPTIONS should be used to set the paper size.
> Can you please help me figure out what to put in the variable?
> 

man gs:
ENVIRONMENT
       GS_OPTIONS
              String of options to be processed before the command line options

example:
GS_OPTIONS='-sPAPERSIZE=a4'

for other known paper size, refer to man gs.