使用 pdflatex 创建符合 PDF/A-2u 标准的文件

使用 pdflatex 创建符合 PDF/A-2u 标准的文件

我正在尝试从我的论文的 LaTEX 版本创建符合 PDF/A-2u 标准的 PDF 文件。我正在使用pdfx包设置为a-2u并使用验证生成的 PDF维拉PDF具有 PDF/A-2u 配置文件的验证器,因为这是我的大学在验证提交的文件时所做的。

但是当我运行验证器时,以下测试失败:

规范:ISO 19005-2:2011,条款:6.2.11.4,测试编号:1

符合文件内用于渲染的所有字体的字体程序都应嵌入该文件中,如 ISO 32000-1:2008,9.9 中所定义。

Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1

我创建了一个相当简单的例子,我将其编译成pdf使用pdflatex document

\documentclass[12pt,a4paper]{report}
\setlength\textwidth{145mm}
\setlength\textheight{247mm}
\setlength\oddsidemargin{15mm}
\setlength\evensidemargin{15mm}
\setlength\topmargin{0mm}
\setlength\headsep{0mm}
\setlength\headheight{0mm}

\let\openright=\clearpage

\usepackage[czech]{babel}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage[utf8]{inputenc}

\usepackage[a-2u]{pdfx}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{bbding}

\usepackage{bm}
\usepackage{graphicx}
\usepackage{fancyvrb}
\usepackage{indentfirst}
\usepackage{natbib}

\usepackage[nottoc]{tocbibind}

\usepackage{icomma}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage{paralist}
\usepackage[usenames,table,xcdraw]{xcolor}

\usepackage{subcaption}
\usepackage{multirow}

\usepackage{tabularx}

\hypersetup{unicode}
\hypersetup{breaklinks=true}

\begin{document}

\pagestyle{empty}
\hypersetup{pageanchor=false}

hello, \emph{world}

\openright
\end{document}

当我运行的时候pdffonts document.pdf,我可以看到所有使用的字体都是嵌入的并且属于类型 1:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
YGPAOD+LMRoman12-Regular             Type 1            Custom           yes yes yes      9  0
OCNWPR+LMRoman12-Italic              Type 1            Custom           yes yes yes     10  0

这意味着字体不符合期望renderingModefontFile_size要求。

有没有办法解决这个问题,最好是在乳胶中?


这是验证器的完整输出:

<?xml version="1.0" encoding="utf-8"?>
<report>
  <buildInformation>
    <releaseDetails id="core" version="1.10.2" buildDate="2017-11-30T12:47:00+01:00"></releaseDetails>
    <releaseDetails id="validation-model" version="1.10.5" buildDate="2017-12-28T11:51:00+01:00"></releaseDetails>
    <releaseDetails id="gui" version="1.10.6" buildDate="2017-12-28T11:58:00+01:00"></releaseDetails>
  </buildInformation>
  <jobs>
    <job>
      <item size="40467">
        <name>/home/.../minimal-example.pdf</name>
      </item>
      <validationReport profileName="PDF/A-2U validation profile" statement="PDF file is not compliant with Validation Profile requirements." isCompliant="false">
        <details passedRules="119" failedRules="1" passedChecks="615" failedChecks="1">
          <rule specification="ISO 19005-2:2011" clause="6.2.11.4" testNumber="1" status="failed" passedChecks="0" failedChecks="1">
            <description>The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-1:2008, 9.9.</description>
            <object>PDFont</object>
            <test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
            <check status="failed">
              <context>root/document[0]/pages[0](5 0 obj PDPage)/contentStream[0](7 0 obj PDContentStream)/operators[9]/font[0](YGPAOD+LMRoman12-Regular)</context>
            </check>
          </rule>
        </details>
      </validationReport>
      <duration start="1523967257917" finish="1523967258155">00:00:00.238</duration>
    </job>
  </jobs>
  <batchSummary totalJobs="1" failedToParse="0" encrypted="0">
    <validationReports compliant="0" nonCompliant="1" failedJobs="0">1</validationReports>
    <featureReports failedJobs="0">0</featureReports>
    <repairReports failedJobs="0">0</repairReports>
    <duration start="1523967257908" finish="1523967258159">00:00:00.251</duration>
  </batchSummary>
</report>

答案1

此问题已在 veraPDF V1.11.19 中修复,请参阅https://github.com/veraPDF/veraPDF-library/issues/957

我确认这是 1.10.6 版 PostScript 字体解析器中的一个问题。它已在开发版中修复。请查看最新的开发版: http://software.verapdf.org/develop/1.11/verapdf-greenfield-1.11.19-installer.zip

相关内容