Reputation: 513
What I am trying to do is combine two postscript files into a pdf. I have already tried using ghostscript to combine them however the issue with that is ghostscript produces a pdf with one ps file on one page and the other on page two which is not what i wish to accomplish
%!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
Here is the second file
The file is to big here is a link to it http://pastebin.com/R0Kgarem
Not sure how I would go about solving this problem. I need the 2 ps files under each other without any white space.
Upvotes: 0
Views: 576
Reputation: 19504
Assuming you mean one toward the top of the page and the other toward the bottom of the page (a 2-up), you just need to prevent the first file from executing showpage
(by redefining, or editing to remove the word showpage
), and then translate (0 -y translate
, where y is the height of the first image) before executing the second file. This assumes the first image is already positioned at the top of the page, otherwise you need to translate it to the correct position first.
Upvotes: 1