使用 pdflatex 创建符合 PDF/A-1B 或 A-2B 标准的文档时出现问题

使用 pdflatex 创建符合 PDF/A-1B 或 A-2B 标准的文档时出现问题

更新 本网站成功了。首先,我添加了 pdfx(使用 a-2b 选项)和 hyperref 包并进行了编译。然后我使用网站将 PDF 转换为 PDFA。通过了这个验证器


我正在关注本教程为了转换我的硕士论文;他使用

\usepackage[a-2b]{pdfx}
\usepackage{hyperref}

我的大学建议这种方法,但结果非常模糊;简而言之,他们

-> Download Acrobat Pro
-> Open Thesis.pdf in latex (compiled without hyperref/pdfx packages}
-> Save as postscript
-> Use Adobe Distiller to go postscript to PDF/A
-> Use Acrobat Pro verification and fix to output final file (very blurry)

使用第一种方法,我使用 verapdf 编译后运行 A-1B/A-2B 验证。程序在 10 秒后停止运行。当我缩短我的 pdf 并重新运行时,我收到很多错误。例如,

Rule    Status
Specification: ISO 19005-2:2011, Clause: 6.2.8, Test number: 3  
If an Image dictionary contains the Interpolate key, its value shall be false. For an inline image, the I key shall have a value of false.  Failed
9 occurrences   Hide
PDXImage    
Interpolate == false    
root/document[0]/pages[10](220 0 obj PDPage)/contentStream[0](221 0 obj PDContentStream)/operators[34]/xObject[0](217 0 obj PDXForm)/contentStream[0](217 0 obj PDContentStream)/operators[806]/xObject[0](235 0 obj PDXImage)/SMask[0](257 0 obj PDSMaskImage)
root/document[0]/pages[28](721 0 obj PDPage)/contentStream[0](722 0 obj PDContentStream)/operators[13]/xObject[0](707 0 obj PDXForm)/contentStream[0](707 0 obj PDContentStream)/operators[10]/xObject[0](727 0 obj PDXImage)
root/document[0]/pages[11](277 0 obj PDPage)/contentStream[0](278 0 obj PDContentStream)/operators[51]/xObject[0](270 0 obj PDXForm)/contentStream[0](270 0 obj PDContentStream)/operators[14]/xObject[0](285 0 obj PDXForm)/contentStream[0](285 0 obj PDContentStream)/operators[4]/xObject[0](291 0 obj PDXImage)/SMask[0](294 0 obj PDSMaskImage)
root/document[0]/pages[28](721 0 obj PDPage)/contentStream[0](722 0 obj PDContentStream)/operators[13]/xObject[0](707 0 obj PDXForm)/contentStream[0](707 0 obj PDContentStream)/operators[40]/xObject[0](730 0 obj PDXImage)
root/document[0]/pages[11](277 0 obj PDPage)/contentStream[0](278 0 obj PDContentStream)/operators[51]/xObject[0](270 0 obj PDXForm)/contentStream[0](270 0 obj PDContentStream)/operators[14]/xObject[0](285 0 obj PDXForm)/contentStream[0](285 0 obj PDContentStream)/operators[4]/xObject[0](291 0 obj PDXImage)
root/document[0]/pages[10](220 0 obj PDPage)/contentStream[0](221 0 obj PDContentStream)/operators[34]/xObject[0](217 0 obj PDXForm)/contentStream[0](217 0 obj PDContentStream)/operators[806]/xObject[0](235 0 obj PDXImage)
root/document[0]/pages[28](721 0 obj PDPage)/contentStream[0](722 0 obj PDContentStream)/operators[13]/xObject[0](707 0 obj PDXForm)/contentStream[0](707 0 obj PDContentStream)/operators[20]/xObject[0](728 0 obj PDXImage)
root/document[0]/pages[11](277 0 obj PDPage)/contentStream[0](278 0 obj PDContentStream)/operators[51]/xObject[0](270 0 obj PDXForm)/contentStream[0](270 0 obj PDContentStream)/operators[9]/xObject[0](284 0 obj PDXForm)/contentStream[0](284 0 obj PDContentStream)/operators[4]/xObject[0](290 0 obj PDXImage)
root/document[0]/pages[28](721 0 obj PDPage)/contentStream[0](722 0 obj PDContentStream)/operators[13]/xObject[0](707 0 obj PDXForm)/contentStream[0](707 0 obj PDContentStream)/operators[30]/xObject[0](729 0 obj PDXImage)


Specification: ISO 19005-2:2011, Clause: 6.2.11.5, Test number: 1   
For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded font program shall be consistent.   Failed
2 occurrences   Hide
Glyph   
renderingMode == 3 || isWidthConsistent == null || isWidthConsistent == true    
root/document[0]/pages[36](837 0 obj PDPage)/contentStream[0](838 0 obj PDContentStream)/operators[185]/usedGlyphs[0](VLXJBU+PazoMathBlackboardBold 67 0 0)
root/document[0]/pages[36](837 0 obj PDPage)/contentStream[0](838 0 obj PDContentStream)/operators[202]/usedGlyphs[0](VLXJBU+PazoMathBlackboardBold 82 0 0)


Specification: ISO 19005-2:2011, Clause: 6.2.11.3, Test number: 2   
ISO 32000-1:2008, 9.7.4, Table 117 requires that all embedded Type 2 CIDFonts in the CIDFont dictionary shall contain a CIDToGIDMap entry that shall be a stream mapping from CIDs to glyph indices or the name Identity, as described in ISO 32000-1:2008, 9.7.4, Table 117.   Failed
2 occurrences   Hide
PDCIDFont   
Subtype != "CIDFontType2" || CIDToGIDMap != null    
root/document[0]/pages[36](837 0 obj PDPage)/contentStream[0](838 0 obj PDContentStream)/operators[231]/xObject[0](834 0 obj PDXForm)/contentStream[0](834 0 obj PDContentStream)/operators[406]/font[0](WQQTJP+LucidaSansUnicode)/DescendantFonts[0](WQQTJP+LucidaSansUnicode)
root/document[0]/pages[36](837 0 obj PDPage)/contentStream[0](838 0 obj PDContentStream)/operators[231]/xObject[0](834 0 obj PDXForm)/contentStream[0](834 0 obj PDContentStream)/operators[418]/font[0](XPXPKK+Verdana)/DescendantFonts[0](XPXPKK+Verdana)

这是我的 Thesis.tex 文件。

\documentclass[titlepage, openany, 11pt]{report} % for longer reports containing several chapters. Draft copy, with detached titlepage, chapter start on any page
\usepackage{float} % to ensure tables and figures cannot be split across pages
\usepackage{afterpage}
\usepackage{mathpazo}
\usepackage{tabularx}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{color}
\usepackage{listings}
\usepackage{float}
\usepackage[toc, page]{appendix}
\graphicspath{{fig/}}
\usepackage[T1]{fontenc}    
\fontfamily{georgia}
\usepackage{mathtools}
\usepackage{bm}
\usepackage{subcaption} 
\usepackage{url}
\usepackage{pdflscape}
\usepackage[toc,page]{appendix}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\hl}[1]{\textcolor{red}{#1}}
\emergencystretch 3em
\usepackage{cite}
\usepackage{amssymb}
\usepackage{framed}
\usepackage[a-2b]{pdfx}
\usepackage{hyperref}

\include{abbr}

\DeclarePairedDelimiter\abs{\lvert}{\rvert}%

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
  language=Python,
  aboveskip=3mm,
  belowskip=6mm,
  showstringspaces=false,
  columns=flexible,
  basicstyle={\small\ttfamily},
  numbers=none,
  numberstyle=\tiny\color{gray},
  keywordstyle=\color{blue},
  commentstyle=\color{dkgreen},
  stringstyle=\color{mauve},
  breaklines=true,
  breakatwhitespace=true,
  tabsize=4
}

%\pagestyle{plain} % page numbers at the bottom in the middle of the footer section
\includeonly{titlepage, abstract, preface, acknowledgements, blankpage, 1introduction, 2relatedwork, 3background, 4experimentalresultsandanalysis, 5simulationapproximationmethodology, 6conclusion, appendices, abbr}


%TEX WILL MAKE 'OVERFULL' LINES IF IT'S ALGORITHM CANNOT NICELY FORMAT A LINE. RESULTS IN BLACK BOX AT END OF LINE
\begin{document}
\onehalfspacing
\pagenumbering{roman}
    \include{titlepage}
\doublespacing
    \include{abstract}
\onehalfspacing
%   \include{preface}
    \include{acknowledgements}

    \tableofcontents
    \listoffigures
    \listoftables

    \printglossary[type=\acronymtype,title=Abbreviations, nonumberlist]
    \printglossary[title=Symbols, nonumberlist]

    \glsresetall %  reset glossary so abbreviations (ABBR) are re-defined in chapters 
    \include{1introduction}
    \include{2relatedwork}
    \include{3background}
    \include{4experimentalresultsandanalysis}
    \include{5simulationapproximationmethodology}
    \include{6conclusion}

    \bibliographystyle{IEEEtran} % sorting bibliography alphebetically
    \bibliography{masters, IEEEabrv}

%   \include{appendices}
\end{document}
  1. 我尝试使用 lualatex看看 pdflatex 是否抑制了错误... 没有
  2. 我尝试在谷歌上搜索错误,但没有一条建议可以在两天内实施
If an Image dictionary contains the Interpolate key, its value shall be false. For an inline image, the I key shall have a value of false.
For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded font program shall be consistent.

有人在我的 Thesis.tex 文件中发现明显问题吗?或者任何建议都非常感谢。此外,如果有我可以付费的服务/人员来处理这个问题,我会很感兴趣。

答案1

使用在线转换器并不能真正解决问题。您在问题中链接的 Peter Selingers 网站很好地解释了原因。

出于同样的原因,贵大学提出的工作流程已经不再是最新的。

自 2020 年起,您可以直接使用 pdfLaTeX 或 LuaLaTeX(N 为 1、2 或 3)创建 PDF/A-Nb 文档。请参阅此PDF/A 最小工作示例

正如 Ulrike 所说,您所包含的文档最好是 PDF/A。

答案2

遇到过类似的问题,我遇到的解决方案是将嵌入光栅图像(即ggplot2热图)的特定 PDF 图形转换为 JPG 或 PNG 格式。对于那些在谷歌搜索时偶然发现此帖子的人,我建议逐一删除每个图像,生成不包含每个图像的 PDF 文件,然后对每个图像运行 PDF/A 验证,以查明哪个图形导致了问题。

相关内容