使用 .NET 创建或操作 EPS 文件

发布于 2024-09-28 13:38:14 字数 772 浏览 2 评论 0 原文

我必须创建数千个单独的 EPS(封装 PostScript)文件。这些文件将由使用 Roland 打印机和软件的公司打印。打印机软件仅接受 eps 文件。

因此,这是我使用自定义矢量图形库实现的过程:

  1. 创建一个单独的位图(这有效)
  2. 用特定的命名颜色在位图周围绘制一个矩形(该颜色必须命名为“CutContour” YMCK (0, 0.9, 0, 0)。颜色本身并不重要,但名称必须设置为“CutContour”
  3. 以 EPS 格式保存图形

现在,使用一些自定义库,我可以执行我所描述的所有步骤,但该库显然不支持颜色名称(专色?)。

我在绝望中尝试了另一种策略:我使用 CorelDraw 在 EPS 中创建了一个工作示例文件(我什至使用 Adob​​e Illustrator

使用十六进制编辑器 完成了它)。我提取了文件的第一部分,直到位图信息和位图之后的底部部分,我能够“注入”单独的位图,并通过连接

可以打开的 部分来创建新的“Frankenstein”eps 文件。这些文件在 CorelDraw 中,但它们一定已损坏,因为打印图像的公司无法在其计算机上打开它们。另外,我对该文件还有一些其他问题。我猜想文件末尾有一些与位图有某种关系的二进制信息。

  1. 有人知道其他库或聪明的方法来获得所需的结果吗?
  2. 有谁知道我可以操纵创建的 eps 文件以便使用“CutContour”颜色名称绘制矩形? (查看我使用 CorelDraw 和 AI 创建的文件并不明显)

感谢您的阅读!

I have to create thousands of individual EPS (Encapsulated PostScript) files. These files will be printed by a company that uses a Roland printer and software. The printer software only accepts eps files.

So this is the procedure I've implemented using a custom vector graphics library:

  1. Create an individual bitmap (this works)
  2. Draw a rectangle around the bitmap in a certain named color (the color must be named "CutContour" YMCK (0, 0.9, 0, 0). The color itself isn't important, but the name must be set to "CutContour".
  3. Save the graphics in the EPS format

Now, using some custom library I was able to do all the steps I've described, but the library apparently doesn't support color names (spot colors?).

Another strategy I tried in my desperation: I've created a working example file in EPS using CorelDraw (I even did it with Adobe Illustrator).

Using a hex editor I extracted the first part of the file until the bitmap information and the bottom part after the bitmap. Using both parts I was able to "inject" the individual bitmap and created new "Frankenstein" eps files just by concatenating the parts.

I could open these files in CorelDraw, but they must be somehow corrupt, because the company that prints the images can't open them on their machines. Also, I have some other issues with that files. I guess there is some binary information at the end of the file that's somehow related to the bitmap.

  1. Does anybody know some other library or clever way to get the desired result?
  2. Does anybody know who I could manipulate the created eps file in order to draw the rectangle using the "CutContour" color name? (It's not obvous looking at the file I've created using CorelDraw and AI)

Thanks for reading!

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

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

发布评论

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

评论(1

南…巷孤猫 2024-10-05 13:38:14

如果其他人必须处理同样的问题,请回答我自己的问题。

最终我想出了一个务实的解决方案。现在,我在 .NET 程序中仅生成 PNG 文件,并使用我录制并调整的 CorelDraw 宏将整个文件夹的内容转换为 .eps 文件。

一个小但重要的细节:为了分配“CutContour”专色从调色板中,您必须在 CorelDraw 中创建一个新的“图形样式”并指定该样式到矩形

Answering my own question if someone else has to deal with the same problem.

In the end I came up with a pragmatic solution. Now I'm generating only the PNG files in my .NET program and use a CorelDraw macro I recorded and adapted to convert the content of a whole folder to .eps files.

A small, but important detail: In order to assign the "CutContour" spot color from the color palette, you have to create a new "Graphics Style" in CorelDraw and assign that style to the rectangle.

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