在ps中嵌入eps文件

发布于 2024-09-03 12:19:42 字数 195 浏览 1 评论 0原文

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

实际上在ps中有大约80页,我想将eps文件代码作为标题放在postscript中,在所有80页中我只想使用它的引用来最小化后记的大小。

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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

感情洁癖 2024-09-10 12:19:42

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

/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 文件,因此它们是可移植的。如果您这样做,您需要继续重命名为读取数据的函数和相应的表单函数。

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

And to use your EPS:

gsave
IDForm execform
grestore

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.

萤火眠眠 2024-09-10 12:19:42

您的问题在封装 PostScript 文件格式规范(只有 34 页,不要害怕!)中得到了解答 可从 Adob​​e 获取。在这里重复信息是没有意义的,参考文档实际上非常简洁明了,并且还包含示例。

Your question is answered in the Encapsulated PostScript File Format Specification (only 34 pages, don't be scared!) available from Adobe. It wouldn't make sense to duplicate the information here, the reference documentation is actually quite concise and clear and also includes examples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文