计算 PDF 上的 CMYK 覆盖率
我不认为有任何免费或开源库能够计算 pdf 文件的 CMYK 覆盖率。我试着环顾四周,似乎找不到任何东西。如果没有任何人可以指出我需要做什么才能计算 pdf 上的 CYMK 覆盖范围的正确方向。哦,我工作的开发环境是 .net Framework 4.0
干杯
I don't suppose is there any free or open source libraries out there that able to calculate the CMYK coverage on a pdf file. I tried looking around I don't seem to able to find any. If there isn't any out there if anyone could point me in the right direction of what do I need to do in order to calculate the CYMK coverage on a pdf. Oh also the development environment I'd be working in is .net framework 4.0
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,现在(从几天前开始)Ghostscript 为所有愿意从源代码编译它的人提供了一个新选项。它仍然是“前沿”,不建议用于生产用途。剩下的就只能等待下一次正式发布了。
新选项以一种名为 inkcov 的新“设备”的形式出现。这与“bbox”设备类似,“bbox”设备会输出每个页面的 BoundingBox 值:“inkcov”设备会输出每个页面所使用的墨水覆盖范围的 C、M、Y 和 K 值(值 1 对应于 100) %)。请注意,墨水总量可能高于 100%(例如:将 100% 的黄色与 100% 的洋红色混合会产生 100% 的“红色”视觉印象)。
使用从当前 Git 源编译的 Ghostcript 尝试此命令:
这将输出与此类似的输出:
这个小实用程序由埃尔兰根大学的 Sebastian Kapfer 创建,并为 Ghostscript 源代码做出了贡献。 (当然,它仍在等待一些繁重的测试和验证,将其结果与其他类似工具进行比较。)
OK, there is a new option now (since a few days ago) with Ghostscript for all those who are willing to compile it from the source. It is still 'bleeding edge', and not recommended for productive use. The rest of you will have to wait for the next official release.
The new option comes in the shape of a new 'device' called inkcov. This works similar to the 'bbox' device which spits out the BoundingBox values for each page: the 'inkcov' device spits out the C, M, Y and K values of ink coverage used for each page (a value of 1 corresponds to 100%). Be aware that the total sum of ink may be higher than 100% (like: mixing 100% of Yellow with 100% of Magenta gives the optical impression of 100% 'Red').
Try this command with a Ghostcript compiled from current Git source:
This will spit out an output similar to this one:
This little utility has been created by Sebastian Kapfer from the University of Erlangen and contributed to the Ghostscript source code. (Of course, it's still awaiting some heavy testing and verification, comparing its results to other similar tools.)
您可以使用 Ghostscript。使用
tiffsep
或tiffsep1
设备以 72dpi 分辨率运行它。这将为每种 CMYK 着色剂创建单独的 TIFF 文件,然后您可以进一步使用该文件来“计算”每种颜色的覆盖范围:此设备创建多个输出文件。它创建:
tiffgray 文件是 LZW 压缩的。
-sOutputFile=...
指定的文件名将是 CMYK 文件。 CMYK 着色剂的分色“tiffgray”文件的名称将在该名称后附加“.Cyan.tif”、“.Magenta.tif”、“.Yellow.tif”和“.Black.tif”。 tiffsep 还自动识别专色并为其创建额外的 tiffgray 分色;这些的名字都附有一个数字。 (您还可以通过在命令行上传递-sSeparationColorNames
来预先确定名称 - 但您最好阅读 Ghostscript 文档(文件 Devices.htm)中的详细信息)。如果您使用
tiffsep1
输出设备,结果将相似 - 不同之处在于您将仅获得灰色分色(没有 32 位复合 CMYK),但这些将是 TIFF G4 文件(G4 压缩方案)。您可以通过添加 -sCompression=lzw (或
none | crle | g3 | g4 | pack
之一)来更改压缩方案。请注意,使用=none
进行压缩将为每种分色着色剂创建相同大小的文件。You can use Ghostscript. Run it with the
tiffsep
ortiffsep1
device at 72dpi resolution. This will create separate TIFF files for each CMYK colorant which you can then further use to 'count' the coverage for each color:This device creates multiple output files. It creates:
The tiffgray files are LZW compressed. The
-sOutputFile=...
-specified filename will be the CMYK file. Names of separation 'tiffgray' files for CMYK colorants will have appended '.Cyan.tif', '.Magenta.tif' '.Yellow.tif' and '.Black.tif' to that name. tiffsep also recognizes spot colors automatically and creates additional tiffgray separations for them; the names of these have a number appended. (You can also pre-determine the names by passing-sSeparationColorNames
on the commandline -- but you better read up the details in Ghostscript's documentation, file Devices.htm).If you use the
tiffsep1
output device, the result will be similar -- the difference is that you will get only the gray separations (no 32bit composite CMYK), but these will be TIFF G4 files (G4 compression scheme).You can change the compression scheme by adding
-sCompression=lzw
(or one ofnone | crle | g3 | g4 | pack
). Be aware that using=none
for compression will create files of equal sizes for each separation colorant.