Merge postscript files



所有跟贴·加跟贴·新语丝读书论坛http://www.xys.org/cgi-bin/mainpage.pl

送交者: 松鼠 于 2005-8-27, 08:10:01:

以前谁说要把两个ps文件合并在一起的?今天碰到这段代码,没有试过:


1. This script can merge serveral ps files into one.
#! /bin/sh
# Merging PS files, as found here : http://ktmatu.com/info/merge-pdf-files/
cat <%!PS
% Written by Helge Blischke, see
% http://groups.google.com/groups?ic=1&selm=3964A684.49D%40srz-berlin.de
%
% The following 2 procs encapsulate the jobs to be processed
% much as is done with EPS images:
/_begin_job_
{
/tweak_save save def
/tweak_dc countdictstack def
/tweak_oc count 1 sub def
userdict begin
}bind def
/_end_job_
{
count tweak_oc sub{pop}repeat
countdictstack tweak_dc sub{end}repeat
tweak_save restore
}bind def
% Now, add your jobs like this:
EOF
for file in $*
do
echo "_begin_job_"
echo "($file) run "
echo "_end_job_"
echo
done

2. Another way: use this command
gs -dNOCACHE -sPAPERSIZE=a4 -dNOPAUSE -sDEVICE=pswrite -dBATCH -sOutputFile=YourFileName.ps file1.ps file2.ps

http://vitamin.uni.cc/node/90




所有跟贴:


加跟贴

笔名: 密码(可选项): 注册笔名请按这里

标题:

内容(可选项):

URL(可选项):
URL标题(可选项):
图像(可选项):


所有跟贴·加跟贴·新语丝读书论坛http://www.xys.org/cgi-bin/mainpage.pl