Otoceni strany o 90 stupnu v postscriptu, slouceni *.ps souboru
Petr Sojka
sojka na daeron.fi.muni.cz
Čtvrtek Listopad 7 13:56:39 CET 1996
"Pavel Lisy wrote:"
:
: Dobry den,
:
: presto ze se to netyka primo teto koonference, doufam, ze se tu vyskytnou PS
: odbornici, kteri mi sdeli, zda to, co chci, jde vubec udelat a jak.
:
: Chci tisknout 70 stran a4 (= 70 souboru.ps) pomoci ghostscriptu
: na plotru HP650c. Kvuli setreni papirem potrebuji bud otocit
: kazdou stranu o 90 st., nebo sloucit vice stran na jeden sheet
: (napr. 2 x a4 portrait na a3 landscape). Chci to delat radeji
: scriptem nebo dopsanim textu do PS souboru.
:
: Pokousel asi dva dny prijit na to, jak otocit PS stranku a4 z portrait
: do landscape (na lezato), pomoci baliku psutils (na linuxu) jsem to
: dokazal pouze za cenu zvetseni velikosti strany na a3, jinak byla
: kresba oriznuta. Nevite, jak to lze udelat?
:
: Navic slucovani nekolika stran na jeden sheet funguje pouze pro
: strany z jednou zdrojoveho souboru. Nebo se pletu?
POkud je o EPS soubory, prozente to TeXem s nactenim kazdeho
souboru na stranecku a5 a pak pres dvips a psnup dostanete
co potrebujete.
Pokud jde o obecny postscript, reseni je trosku slozitejsi,
nebot je treba se v nem oreinetovat.
Pokud jde o postscripty generovane stejnou aplikaci
a navic maji stejny postscriptovy prolog, mate vyhrano
a pujdou jednouduse sloucit do 1 souboru.
Pak staci pouzit psnup, ktery dokaze to, co potrebujete.
Pro pripad, ze se do toho budete chtit ponorit hloubeji prikladam
prolog, ktery umi stranku zoomovat a zrcadlit (pro ofsetovy tisk)
tak, ze predefinuje operator showpage, ktery standardne
vykresluje stranku a prida pred nej pozadovanou lineani
transformaci.
Zdravim
Petr Sojka
:
: S diky za napady
:
: Pavel
% This is file named mirror.ps
% Version V1.0
%
% Here is a quick hack to print documents created for one
% paper size on another
% and
% to mirror the page.
% Note that if the sizes are not
% very close graphics will be distorted.
%
% Just add this as a prefix to your document.
% (To retain pagination control, it should come AFTER the
% %%EndComments line, preferably in the %%BeginSetup section.)
%
% Petr Sojka 10/03/94, sojka na muni.cz
% Revised 9/24/94 to handle mirroring of a page and zooming in one step
% James E. Burns, 1/21/93, burns na nova.bellcore.com
% Revised 11/16/93 to avoid unneeded dictionary entries
% Revised 12/30/93 to handle any given page sizes
% Revised 1/6/92 to suppress pagedevice commands that block this hack
% Revised 1/7/92 Removed unnecessary dictionary entries
systemdict begin
[
[
% This sets the transformation matrix to scale to the new page size.
% Exactly two of the following lines should be uncommented.
% The first size will be scaled to the second.
595 842 % A4
% 612 1008 % legal
% 792 1224 % 11x17
% 516 729 % B5
% 612 792 % letter
% 612 792 % lettersmall
% 420 595 % A5
% 729 1032 % B4
595 842 % A4 % e.g. A4->A4 means no zooming
% so we now have 4 numbers on the stack, let them call
% a b c d
exch
% a b d c
4 -1 roll
% b d c a
div neg
% b d -c/a
3 1 roll
% -c/a b d
exch div
% -c/a d/b
0.0 0.0 3 -1 roll
% -c/a 0 0 d/b
% For some documents, it might be useful to add some translation
% (i.e., replace the following two values.)
595 % the x-size is the default here for x-movement!
0.0 % y-movement (in bp)
% that is, [-c/a 0 0 d/b 595 0.0] are the final concat parameters
]
% dup == flush % (uncomment For testing)
/concat load
]
% let add the above to the system dictionary (patching the showpage command)
cvx dup exec
/showpage [ /showpage load 4 3 roll /exec load ] cvx
end % systemdict
def
% that is all
Další informace o konferenci Linux