Class ColorSpaceRule

java.lang.Object
org.ofdrw.archive.check.rule.ColorSpaceRule
All Implemented Interfaces:
ArchiveRule

public class ColorSpaceRule extends Object implements ArchiveRule
规则 9:颜色空间仅限 Gray/RGB/CMYK(GB/T 42133-2022 6.3.1b)

只检查,不做转换。OFDColorSpaceType 枚举本身只定义了 GRAY/RGB/CMYK, 非法类型在解析时就会抛出异常。

Since:
2.4.0
Author:
权观宇
  • Field Details

  • Constructor Details

    • ColorSpaceRule

      public ColorSpaceRule()
  • Method Details

    • check

      public List<ArchiveViolation> check(OFDReader reader, org.ofdrw.pkg.container.OFDDir ofdDir)
      Description copied from interface: ArchiveRule
      对打开的 OFD 文档执行检查

      检查过程只读,不修改文档内容。

      Specified by:
      check in interface ArchiveRule
      Parameters:
      reader - OFD 阅读器,提供资源、页面、附件等高级访问能力
      ofdDir - OFD 虚拟容器,提供低级的文件和目录操作
      Returns:
      发现的违规项列表(非 null),文档合规时返回空列表