我正在尝试做的是将两个postscript文件合并成一个pdf。我已经尝试使用ghostscript将它们组合在一起,但是问题是ghostscript会生成一个pdf,其中一个ps文件在一页上,另一个在第二页上,这不是我想要完成的。
%!PS-Adobe-3.0
%%Pages: 1
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%Page: 1 1
save
6 dict begin currentpagedevice/PageSize get dup 0 get
0 sub 0 sub/w exch
def 1 get 0 sub 0 sub/h exch
def/x 87 def/y 87 def 0 0/b y h mul x
w mul gt def b{w y}{h x}ifelse div/c x h mul y w mul gt def c{w x}{h y}ifelse
div gt{h add translate -90 rotate b{w y h x w mul y div sub 2 div 0}{h
x 0 w y h mul x div sub 2 div}}{translate c{w x 0 h y w mul x div sub 2 div}{h
y w x h mul y div sub 2 div 0}}ifelse ifelse translate div dup scale
end 9 dict begin
{/T currentfile/ASCII85Decode filter def/DeviceGray setcolorspace
/F T/LZWDecode filter def
<</ImageType 1/Width 87/Height 87/BitsPerComponent
1/ImageMatrix[1 0 0 -1 0 87]/Decode
[0 1]/DataSource F>> image
F closefile T closefile}
%%BeginData:;
exec
J3Vsg3$\8+#CjR`&3*WA'+TR\@<!\`;@aOp`$+XV`%h8\!!!K[!9Aet#*;BOP%d==7jS.,hsVBYnDH
N[+5cZ=UtTfLSkWhgRG8\?,WGcN^j5#cP]3KsWRSLmE;_bp<GM2!Q!1FiRE6!+E91]DA$X`8iQFZYB
0mS8-o5Xu!f_0094V'pA:@g3R,3i_$'Yp\)8e-_&1fqhs%"+h!UL4I6R@tNA[6Bt^^UAX[:aRMSIU!
416=^MmJq2-+0!fVFnDer\kkA9UY#Q*n/l#Ih/>7,IEq;.)e7/q%Q&SL"j'""q7'ad9:Z00;\?qF/.
8a*mIt,hY3"qji0!BA*e-tRs6.F-k:_SnL*&QCrBB*lce!!;K8Fj4Hp6d?"Tg3Y4:8BLi#B-/VXSPS
#XP\B&qLYW4;Koo&C`>f_omCk&%aL+C?WTr*(:Q0YB"7Y0@*i?(aUW\?B(Z"l6;3X;8O\%8-n:/*6;
f^!W~>
%%EndData
end restore showpage
%%Trailer
%%EOF这是第二个文件
这个文件太大了,这里有一个指向它的链接http://pastebin.com/R0Kgarem
我不确定我该如何解决这个问题。我需要的两个ps文件下彼此没有任何空白。
发布于 2012-12-20 14:37:51
假设您的意思是一个朝向页面顶部,另一个朝向页面底部(双幅),您只需要防止第一个文件执行showpage (通过重新定义或编辑以删除单词showpage),然后在执行第二个文件之前转换(0 -y translate,其中y是第一个图像的高度)。这假设第一个图像已经定位在页面的顶部,否则您需要首先将其转换到正确的位置。
https://stackoverflow.com/questions/13963880
复制相似问题