Ghostscript 中的钩子
任何人都知道挂钩 Ghostscript 的正确位置,以便在解释 ps 文件时,我可以获取以下形式的所有调用的日志:
draw_character(float x, float y, string font_name, int char_id); ?
基本上我想获取一个 postscript 文件,并获取所有字符绘制到屏幕的位置的列表。
谢谢!
Anyone know the right places to hook into ghostscript, so that when interpreting a ps file, I can get logs of all calls of the form:
draw_character(float x, float y, string font_name, int char_id); ?
Basically I want to take a postscript file, and get a list of where all characters are drawn to the screen.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定这个答案是否会对您有所帮助...但是您知道如何在命令行上从 Ghostscript 获取调试信息吗?只需将“-dDEBUG”添加到命令行,它就会输出大量附加信息。要仅从特定主题获取调试信息,您有以下选择:
PostScript 程序员大师可能会编写一个小 PostScript 程序,该程序可以通过以打印的方式重新定义其中一个运算符(showglyph?)来完成您想要的操作输出您想要的信息,而不是(或之前)绘制每个单独的角色,然后针对您的目标 PS 文件运行该信息。
也许您应该在 comp.text.pdf 或 comp.lang.postscript 中提出您的问题?
I'm not sure if this answer is going to help you... but do you know how to harvest debugging information from Ghostscript on the commandline? Simply add "-dDEBUG" to the commandline and it will spit out lots of additional info. To get debugging info from only specific topics, you have these options:
Possibly, a PostScript programmer guru could write a little PostScript program that could do what you want by re-defining one of the operators (showglyph?) in a way that it prints out the info you want instead of (or before) drawing each individual character and run that against your target PS file.
Maybe you should ask your question in comp.text.pdf or in comp.lang.postscript ?