本文介绍了在ps中嵌入eps文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过jpeg2ps将 jpeg 图像转换为eps(封装后记),现在我想将新创建的eps嵌入PS(后记)文件中,知道吗?

I convert jpeg image to eps(encapsulated postscript) via jpeg2ps, now I want to embed newly created eps in PS(postscript) file, any idea?

实际上在 ps 中有大约80页,我想放置 eps 以Postscript为标题的文件代码,在全部80页中,我只想使用其引用来最大程度地减少Postscript的大小。

Actually in ps there are about 80 pages, I want to put eps file code in postscript as a header, and in all 80 pages I just want to use its reference to minimize the size of postscript.

推荐答案

这是Tom Greer多年前通过Tek-tips给我提供的。我们已经使用此代码近十年了,并且始终可以完美地工作:

This was offered to me years ago by Tom Greer via Tek-tips. We have been using this code for almost a decade and has always worked flawlessly:

/ImageData
currentfile
<< /Filter /SubFileDecode
   /DecodeParms << /EODString (*EOD*) >>
>> /ReusableStreamDecode filter
[-->PUT YOUR EPS HERE<--]
*EOD*
def

/IDForm
<< /FormType 1
   /BBox [154 321 441 521]
   /Matrix [ 1 0 0 1 0 0]
   /PaintProc
   { pop
       /ostate save def
         /showpage {} def
         /setpagedevice /pop load def
         ImageData 0 setfileposition ImageData cvx exec
       ostate restore
   } bind
>> def

并使用您的EPS:

gsave
IDForm execform
grestore

我们在所有打印作业中嵌入了许多EPS文件,因此它们可移植。如果执行类似的操作,则需要继续重命名为读取数据的函数,并相应地重命名表单函数。

We embed numerous EPS files in all our print jobs so they are portable. If you do similarly you need to keep renaming to function that reads the data and the form function accordingly.

这篇关于在ps中嵌入eps文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 06:46