summaryrefslogtreecommitdiff
path: root/support/psfixbb/psfixbb.html
blob: 8c8c3a751ed6b44d0175eb1ca75d28aaa78bdd6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<HTML>
<HEAD>
<TITLE>B<psfixbb> - fix the BoundingBox in a Postscript file.</TITLE>
<LINK REV="made" HREF="mailto:prospector@porky.devel.redhat.com">
</HEAD>

<BODY>

<A NAME="__index__"></A>
<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#name">NAME</A></LI>
	<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
	<LI><A HREF="#description">DESCRIPTION</A></LI>
	<LI><A HREF="#options">OPTIONS</A></LI>
	<LI><A HREF="#author">AUTHOR</A></LI>
	<LI><A HREF="#files">FILES</A></LI>
	<LI><A HREF="#see also">SEE ALSO</A></LI>
	<LI><A HREF="#bugs">BUGS</A></LI>
	<LI><A HREF="#acknowledgments">ACKNOWLEDGMENTS</A></LI>
</UL>
<!-- INDEX END -->

<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P><STRONG>psfixbb</STRONG> - fix the BoundingBox in a Postscript file.</P>
<P>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<P><CODE>psfixbb [-ceflr] [-x N] [-o outfile] filename  [filename...]</CODE></P>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P><STRONG>psfixbb</STRONG> is a tool to create a BoundingBox in <CODE>Postscript(R)</CODE> files
which do not have one, or to fix an incorrect existing BoundingBox.</P>
<P>Many applications write <CODE>Postscript(R)</CODE> files or Encapsulated
<CODE>Postscript(R)</CODE> files with no or incorrect BoundingBox information.
I.e. the box which contains the image or text on the page is often
smaller than specified in the %%BoundingBox comment in the file.  This
can be annoying when importing the file into other documents.
<STRONG>psfixbb</STRONG> computes the size of the used part of a page and inserts
the information into the file.</P>
<P><STRONG>psfixbb</STRONG> uses ghostscript (<STRONG>gs</STRONG>) to transform the page into a
portable bit map (pbm), then the <STRONG>pnmfile</STRONG> and <STRONG>pnmcrop</STRONG> utilities
to determine the size of the non-white part of the page.  These three
programs need to be installed for <STRONG>psfixbb</STRONG> to work.</P>
<P>Because <STRONG>psfixbb</STRONG> really looks at the dark pixels of the page, it
works even if the application which produced the Postscript file has
painted the backgroud of the whole page white.  Most other
boundingbox-fixing utilities fail in such cases.</P>
<P>For landscape files you need to run psfixbb with the <STRONG>-r</STRONG> switch.</P>
<P>
<HR>
<H1><A NAME="options">OPTIONS</A></H1>
<DL>
<DT><STRONG><A NAME="item_%2Dc"><STRONG>-c</STRONG></A></STRONG><BR>
<DD>
Send a new file with the correct BoundingBox to stdout.  This will
leave the original file untouched.  Only the first filename on the
command line will be processed.
<P></P>
<DT><STRONG><A NAME="item_%2De"><STRONG>-e</STRONG></A></STRONG><BR>
<DD>
When the filename extension is <EM>.ps</EM>, change it to <EM>.eps</EM> (unless
the resulting file name corresponds to an existing file).  See also
the <STRONG>-f</STRONG> flag.
<P></P>
<DT><STRONG><A NAME="item_%2Df"><STRONG>-f</STRONG></A></STRONG><BR>
<DD>
When specified together with the <STRONG>-e</STRONG> flag, existing <EM>.eps</EM> files
are overwritten when necessary.
<P></P>
<DT><STRONG><A NAME="item_%2Dl"><STRONG>-l</STRONG></A></STRONG><BR>
<DD>
List computed BoundingBoxes, do not change any files.
<P></P>
<DT><STRONG><A NAME="item_%2Do_outfile"><STRONG>-o outfile</STRONG></A></STRONG><BR>
<DD>
Output to file OUTFILE.
<P></P>
<DT><STRONG><A NAME="item_%2Dr"><STRONG>-r</STRONG></A></STRONG><BR>
<DD>
Rotate the postscript file before attempting to compute the bounding
box.  Needed for landscape files.
<P></P>
<DT><STRONG><A NAME="item_%2Dx_N"><STRONG>-x N</STRONG></A></STRONG><BR>
<DD>
The BoundingBox created can be made larger than the actual image by N
postscript points with this option.
<P></P></DL>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Carsten Dominik    &lt;<A HREF="mailto:dominik@strw.LeidenUniv.nl">dominik@strw.LeidenUniv.nl</A>&gt;</P>
<P>Holger Karl        &lt;<A HREF="mailto:karl@informatik.hu-berlin.de">karl@informatik.hu-berlin.de</A>&gt;</P>
<P>This program is free software.  See the source file for the full
copyright notice.</P>
<P>
<HR>
<H1><A NAME="files">FILES</A></H1>
<P>For the file <EM>file.ps</EM>, <EM>file.ps%</EM> is used temporarily to
hold a new version of the file with changed BoundingBox.</P>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P>gs(1), pnmfile(1), pnmcrop(1), <CODE>pnm(5)</CODE></P>
<P>
<HR>
<H1><A NAME="bugs">BUGS</A></H1>
<P><STRONG>psfixbb</STRONG> does not work for images larger than a normal page.</P>
<P>The file <EM>file.ps%</EM> is overwritten without checking.  For multipage
documents, only the first page determines the value of the
BoundingBox.</P>
<P>
<HR>
<H1><A NAME="acknowledgments">ACKNOWLEDGMENTS</A></H1>
<P>Thanks to Georg Drenkhahn for pointing out how to enforce a showpage
command in gs.</P>

</BODY>

</HTML>