你怎么知道文件的CGM版本是什么?

时间:2021-09-17 06:30:02

I have been searching and while I can find many descriptions of the different versions of CGM files, I am trying to find a way to tell what version of CGM a particular file is.

我一直在搜索,虽然我可以找到许多不同版本的CGM文件的描述,但我试图找到一种方法来告诉特定文件的CGM版本。

I have been having some issues with printing pdf documents that include CGM images. Most will print, some will not. I have been told we only support CGM version 1, so I am looking for a way to tell what CGM version these images that aren't printing are.

我在打印包含CGM图像的pdf文档时遇到了一些问题。大多数会打印,有些则不打印。我被告知我们只支持CGM版本1,所以我正在寻找一种方法来告诉CGM版本这些未打印的图像是什么。

We use Apache FOP and the jcgm plugin to turn an xml file, xsl file and some graphics into a pdf file.

我们使用Apache FOP和jcgm插件将xml文件,xsl文件和一些图形转换为pdf文件。

Is there any way to tell what version a cgm file is so I can determine if that is the problem I am running into or if it is something else?

有没有办法告诉cgm文件的版本是什么,所以我可以确定这是我遇到的问题还是其他的东西?

1 个解决方案

#1


1  

The version of a CGM file is encoded in its header: the METAFILE VERSION command contains the version number (1, 2, 3, 4).

CGM文件的版本在其标头中编码:METAFILE VERSION命令包含版本号(1,2,3,4)。

The jcgm library provides access to all commands of a CGM file: the CGM class has a showCGMCommands method that can be used to print them.

jcgm库提供对CGM文件的所有命令的访问:CGM类有一个showCGMCommands方法,可用于打印它们。

For the images that don't print, you can check whether the commands they're using is supported by the library since jcgm does not support all commands: jcgm implemented commands.

对于不打印的图像,您可以检查库是否支持它们正在使用的命令,因为jcgm不支持所有命令:jcgm实现的命令。

#1


1  

The version of a CGM file is encoded in its header: the METAFILE VERSION command contains the version number (1, 2, 3, 4).

CGM文件的版本在其标头中编码:METAFILE VERSION命令包含版本号(1,2,3,4)。

The jcgm library provides access to all commands of a CGM file: the CGM class has a showCGMCommands method that can be used to print them.

jcgm库提供对CGM文件的所有命令的访问:CGM类有一个showCGMCommands方法,可用于打印它们。

For the images that don't print, you can check whether the commands they're using is supported by the library since jcgm does not support all commands: jcgm implemented commands.

对于不打印的图像,您可以检查库是否支持它们正在使用的命令,因为jcgm不支持所有命令:jcgm实现的命令。