0

This is strongly related to:

PDF/A with Linux Libertine und Linux Biolinum using pdfLaTeX

I can confirm that the posted MWE works under Ubuntu 18 / TeXLive 2017. However, once I add an \emph{p} somewhere in the text, VeraPDF fails to validate the file (see below).

% !TeX program = pdflatex
% !TeX encoding = UTF-8
%%% PDF/A-1b, PDF/A-2b, PDF/A-2u or PDF/X-1 with Linux Libertine
%%% and Linux Biolinum using pdfLaTeX supporting datetime control (PDF/A PDF/X),
%%% cyrillic, CMYK icc and sRGB icc

%%%% PDF/A PDF/X setup part %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Variables initiating  %%%
\newcounter{colourmode}
\newcounter{pdftype}
\newcounter{iccinsert}

%% Control of colour mode and pdf type
\setcounter{colourmode}{1}  % 0 --- undefined (or rgb); 1 --- cmyk (always for pdf/x); 2 --- rgb
\setcounter{pdftype}{2}     % 0 --- undefined; 1 --- pdf/x; 2 --- pdf/a
\setcounter{iccinsert}{0}   % 0 --- don't upload icc cmyk inside pdf/x; 1 --- upload icc cmyk inside pdf/x;
\newcommand{\pdfapart}{1}        % PDF/A part (1, 2)
\newcommand{\pdfaconformance}{B} % PDF/A conformance (A, B, U)

%% Setting date
\newcommand{\docModDate}{\DTMdisplay{2016}{10}{02}{-1}{20}{00}{21}{03}{00}} % Some particular date example
%\newcommand{\docModDate}{\DTMnow} %current time, usual situation (today time)
\newcommand{\docCreationDate}{\docModDate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{etoolbox}[2015/08/02]

\ifnumequal{\value{pdftype}}{1}{
    \pdfobjcompresslevel=0%
    \pdfminorversion=3% must be set 3 for PDF 1.3 required by PDF/X
}{}
\ifboolexpr{test {\ifnumequal{\value{pdftype}}{2}} and test {\ifdefstring{\pdfapart}{1}}}{
    \pdfobjcompresslevel=0%
    \pdfminorversion=4% must be set 4 for PDF 1.4 required by PDF/A-1
}{}
\pdfinclusioncopyfonts=1
\PassOptionsToPackage{safe, warn}{textcomp}

%%%% PDF/A PDF/X setup part END %%%%

%%% Main class setting %%%
\documentclass[a4paper,12pt]{article}

%%% PDF/A PDF/X needed packages %%%
\usepackage{datetime2} % for date and time fields control
\usepackage{atbegshi}

%%%% For proper copypasting of text from pdf
\input glyphtounicode.tex
\input glyphtounicode-cmr.tex %from pdfx package
\pdfgentounicode=1

%%%% Setting options for russian language that follows.
\usepackage{cmap}              % Better search for text in pdf-file
\defaulthyphenchar=127         % Better hyphenation for copypasting
%\usepackage{textcomp}
\usepackage[T2A, T1]{fontenc}   % Russian letters support with T2A
\usepackage[utf8]{inputenc}[2014/04/30]
\usepackage[english, russian, ukrainian, german]{babel}[2014/03/24] %main language has to be set last
\babelensure[fontenc=T2A]{russian}

%%% Colours
\ifboolexpr{test {\ifnumequal{\value{colourmode}}{1}} or test {\ifnumequal{\value{pdftype}}{1}}}{
    \usepackage[dvipsnames, table, hyperref, cmyk]{xcolor}  % cmyk colours --- needed for PDF/X, questionable for PDF/A
}{%
    \ifnumequal{\value{colourmode}}{2}{%
        \usepackage[dvipsnames, table, hyperref, rgb]{xcolor}  % rgb colours
    }{%
        \usepackage[dvipsnames, table, hyperref]{xcolor}
    }
}

\usepackage{libertine}[2017/03/22]
\usepackage[libertine]{newtxmath}

%%% Hyperlinks %%%
\usepackage{hyperxmp}[2017/02/23] % extended pdf options
\ifnumless{\value{pdftype}}{2}{%
    \usepackage{hyperref}[2012/11/06]
}{%
    \usepackage[pdfa]{hyperref}[2012/11/06]
}

\newcommand{\docTitle}{Тестовый ŘÍŽŤŮĚĎ документ --- PDF/A and PDF/X test document}
\newcommand{\docAuthor}{Имя Фамилия ŠŘÍŽŤŮĚĎ}
\newcommand{\AuthorURL}{http://orcid.org/0000-0000-0000-0000} 

\title{\docTitle}
\author{\docAuthor}

\definecolor{citecolor}{cmyk}{0,0.6,0,0}

\selectlanguage{russian}
\hypersetup{% 
    unicode=true,
    pdftitle={\docTitle},
    pdfauthor={\docAuthor},
    pdfcopyright={This work is licensed under Creative Commons Public Attribution 4.0 International License},
    pdfsubject={Subject}, 
    pdfkeywords={PDF/A} {PDF/X} {TeX} {LaTeX} {Typesetting},
    pdflicenseurl={http://creativecommons.org/licenses/by/4.0/},
    pdfmetalang={en},
    pdflang={ru},
    bookmarksopen=true,
    bookmarksopenlevel=3,
    hypertexnames=false,% use guessable names for links
    linktocpage=true,
    plainpages=false,           % Forces page anchors to be named by the Arabic form  of the page number, rather than the formatted form
    colorlinks,
    breaklinks,
    citecolor={citecolor},
    pdfcontacturl = {\AuthorURL},
    pdfcontactaddress = {123456\xmpcomma\ Москва\xmpcomma\ \AuthorURL},
    pdfcontactcity = {Город \AuthorURL},
    pdfcontactcountry = {Россия},
    pdfcontactemail = {some\_mail@mail.ru}, 
    pdfcontactphone = {+7 (333) \AuthorURL},
    pdfcontactpostcode = {123456 postcode \AuthorURL},
    pdfcontactregion = {Регион \AuthorURL},
}

\ifnumgreater{\value{pdftype}}{0}{%
    \DTMsetstyle{pdf} % sets further dates to be in PDF format

    \hypersetup{
        pdfcreationdate={\docCreationDate}, % hyperref defined, hyperref expects it to be in PDF format
        pdfmoddate={\docModDate}, % hyperref defined, hyperref expects it to be in PDF format
        pdfdate={\docModDate}, % hyperxmp defined, can be in either PDF format or XMP format
        pdfmetadate={\docModDate}, % hyperxmp defined, can be in either PDF format or XMP format
    }

    \pdfstringdef\inputTitle{\docTitle}
}{}

\makeatletter
\ifboolexpr{test {\ifnumequal{\value{pdftype}}{2}} and test {\ifnumequal{\value{colourmode}}{1}}}{%
    % Dirty hack of hyperref to make rgb-like links annotated with C mark become annotated with K mark to work in PDF/A with CMYK
    % makeatletter - makeatother needed
    \patchcmd{\hyper@linkfile}{/C[}{/K[}{}{}
    \patchcmd{\hyper@linkurl}{/C[}{/K[}{}{}
    \patchcmd{\find@pdflink}{/C[}{/K[}{}{}
    \patchcmd{\hyper@linkstart}{/C[}{/K[}{}{}
}{}
\makeatother

%%%Does not work inside ifthen environments
%%http://tex.stackexchange.com/a/248911
%%72.27 pt is 72 bp, 800/803 %%http://tex.stackexchange.com/a/113513
%%(mm size * 72)/25.4 = bp size
\makeatletter
\edef\pwbp{\strip@pt\dimexpr0.996264009963\paperwidth\relax} %paper width in bp (PS points)
\edef\phbp{\strip@pt\dimexpr0.996264009963\paperheight\relax} %paper height in bp (PS points)
\makeatother

\edef\calcpdfpageattr{%
    /TrimBox [0.00000 0.00000 \pwbp\space\phbp]%
}

\ifnumequal{\value{pdftype}}{1}{%
    \hypersetup{pdfstartpage={},% disable openaction of hyperref for PDF/X compliance
    }

%%%%%%%%% PDF-X stuff, IF USING pdflatex or lualatex %%%%%%%%%
    \expandafter\pdfpageattr\expandafter{\calcpdfpageattr} %works

    \pdfinfo{ %for PDF/X %fill manually
      /Title(\inputTitle)
      /GTS_PDFXVersion (PDF/X-1:2001)
      /GTS_PDFXConformance (PDF/X-1a:2001)
    }%

    \ifnumequal{\value{iccinsert}}{1}{
        % insert CMYK icc from pdfx package inside file
        \immediate\pdfobj stream attr{/N 4^^J/Alternate/DeviceCMYK} file{coated_FOGRA39L_argl.icc}
        \pdfcatalog{%
          /PageMode /UseNone
          /OutputIntents [
            <<
              /Info (FOGRA39L)
              /Type /OutputIntent
              /S /GTS_PDFX
              /DestOutputProfile \the\pdflastobj\space 0 R
              /OutputConditionIdentifier (Coated FOGRA39)
              /RegistryName (http://www.color.org/)
            >>
          ]
        }
    }{%
        % don't insert CMYK icc from pdfx package inside file
        \pdfcatalog{ %for PDF/X
          /PageMode /UseNone
          /OutputIntents [
            <<
              /Info (none)
              /Type /OutputIntent
              /S /GTS_PDFX
              /OutputConditionIdentifier (Custom)
              /RegistryName (http://www.color.org/)
            >>
          ]
        }%
    }%

    \NoHyper%Have to kill all links/annotations for pdf-x compliance
    %http://tex.stackexchange.com/a/300675 %NoHyper environment does not deactivate the creation of bookmarks, the inclusion of document information etc.
}{}

\ifnumequal{\value{pdftype}}{2}{%
%%%%%%%%% PDF-A stuff, IF USING pdflatex or lualatex %%%%%%%%%
    \expandafter\pdfpageattr\expandafter{\calcpdfpageattr} %not really needed for PDF/A

    \ifnumequal{\value{colourmode}}{1}{%
        \immediate\pdfobj stream attr{/N 4} file{coated_FOGRA39L_argl.icc} %loads from pdfx package distribution
        \pdfcatalog{ %for PDF/A
          /PageMode /UseNone
          /OutputIntents [
            <<
              /Type /OutputIntent
              /S /GTS_PDFA1
              /DestOutputProfile \the\pdflastobj\space 0 R
              /OutputConditionIdentifier (Coated FOGRA39)
              /Info(FOGRA39 (ISO Coated v2 300\% (ECI)))
              /RegistryName (http://www.argyllcms.com/)
            >>
          ]
        }%
    }{%
        \immediate\pdfobj stream attr{/N 3^^J/Alternate/DeviceRGB} file{sRGB_IEC61966-2-1_black_scaled.icc}
        \pdfcatalog{ %for PDF/A
          /PageMode /UseNone
          /OutputIntents [
            <<
              /Type /OutputIntent
              /S /GTS_PDFA1
              /DestOutputProfile \the\pdflastobj\space 0 R
              /OutputConditionIdentifier (sRGB_IEC61966-2-1_black_scale)
              /Info(sRGB IEC61966 v2.1 with black scaling)
              /RegistryName (http://www.color.org/)
            >>
          ]
        }%
    }

    %%% Setting custom PDF/A part and conformance through hyperxmp
    \hypersetup{%
        pdfapart = {\pdfapart},
        pdfaconformance = {\pdfaconformance},
    }
}{}

%%% Solving \textnumero problem in russian pdflatex
%%% Don't know how to explain why this works
\UndeclareTextCommand{\textnumero}{T2A}
\UndeclareTextCommand{\S}{T2A}
\UndeclareTextCommand{\textpertenthousand}{T2A}
\usepackage{textcomp} %depending on previous font packages this may be second call to package

\begin{document}

\begin{otherlanguage*}{russian}
\maketitle
\end{otherlanguage*}

\section{Erster Abschnitt}
\label{CLA:erster-abschnitt}

Ein Text mit \emph{Auszeichnung} und sogar \textbf{fettem} Text, sogar {\sffamily{}
    LinBiolium als Schrift \emph{auch noch hervorgehoben}}. \emph{p}

Testing usually problematic symbols: \textnumero \S \textpertenthousand
\textthreequarters \textohm \textmho \textmu \texttimes \textdiv

\section{Some text (pangrams) in different languages}

\begin{otherlanguage*}{russian}
Любя, съешь щипцы, "--- вздохнёт мэр, "--- кайф жгуч. Шеф взъярён тчк щипцы
с~эхом гудбай Жюль. Эй, жлоб! Где туз? Прячь юных съёмщиц в~шкаф. Экс-граф?
Плюш изъят. Бьём чуждый цен хвощ! Эх, чужак! Общий съём цен шляп (юфть) "---
вдрызг!
\end{otherlanguage*}

Příliš žluťoučký kůň úpěl ďábelské ódy! Typographie ist zweidimensionale
Architektur und bedingt extra Qualität in jeder vollkommenen Ausfuehrung.
\begin{otherlanguage*}{russian}
Государев указ: душегубцев да шваль всякую высечь, да калёным железом по щекам
этих физиономий съездить! 200\dots450~{\textdegree}C. Широкая электрификация
южных губерний даст мощный толчок подъёму сельского хозяйства. Подъехал шофёр
на рефрижераторе грузить яйца для обучающихся элитных медиков.
\end{otherlanguage*}
1234567890.

\begin{otherlanguage*}{russian}
\[
\alpha = \frac{1}{l_0}\cdot \frac{\mathrm{d}l}{\mathrm{d}T},
\]
где $\alpha$ "--- ящерицы чешут вперёд за ключом,~1/{\textdegree}C;
$l_0$ "--- месторождения кварцующихся фей без слёз,~м;
$\mathrm{d}l$ "--- фиг выговоришь этюд,~м;
$\mathrm{d}T$ "--- жирафы честно в цель шагают, да щук объять,~{\textdegree}C.
\end{otherlanguage*}

El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba el
saxofón detrás del palenque de paja.

\begin{otherlanguage*}{russian}
\begin{tabular}{c|c}
1 & 2 поводок\\
3 missisipy & 4
\end{tabular}
\end{otherlanguage*}

\begin{otherlanguage*}{ukrainian}
Матеріали конференції присвячені сучасним проблемам фізики та фізичних
технологій, перспективним напрямкам фізики енергетичних систем, теорії
безпеки, криптографічного захисту інформації та криптоаналізу, захисту
інформації в комп’ютерних мережах та комунікаціях, забезпеченню цілісності баз
даних, захисту від витоку інформації по каналах побічного електромагнітного
випромінювання, локальним мережам різної струк\-тури, технічного захисту
об’єктів, а також науковим дослідженням фундаментального та прикладного
характеру у сфері інформаційних наук.
\end{otherlanguage*}

\end{document}

Rule Status Specification: ISO 19005-1:2005, Clause: 6.3.5, Test number: 1 Embedded font programs shall define all font glyphs referenced for rendering with conforming file. Failed 1 occurrences Show

Specification: ISO 19005-1:2005, Clause: 6.3.6, 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 1 occurrences Show

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.