Skip to content
Snippets Groups Projects
Commit 635c581c authored by Jan-Åke Larsson's avatar Jan-Åke Larsson
Browse files

Use hyperxmp instead of pdfx, and CMYK outputindent for both PDF/A and PDF/X

parent 53404f13
No related branches found
No related tags found
3 merge requests!40Enable PDF/A-2b to choose between RGB and CMYK,!39Another colorprofile textstring,!38Add rudimentary PDF/A-2b support
This commit is part of merge request !39. Comments created here will be created in the context of that merge request.
File deleted
File deleted
......@@ -118,6 +118,7 @@
\createvariable{examiner}
\createvariable{titleenglish}
\createvariable{titleswedish}
\renewcommand{\@title}{\ifx\@titleenglish\@empty\@titleswedish\else\@titleenglish\fi}
\createvariable{keywords}
\createvariable{keywordsswedish}
\createvariable{department}
......@@ -304,24 +305,78 @@
\PassOptionsToPackage{svgnames}{xcolor}
\PassOptionsToPackage{pdfusetitle}{hyperref}
%%%%%%%%%% PDF/A support
%
\ifxetex
\let\pdfcreationdate=\creationdate
\fi
% https://tex.stackexchange.com/questions/474197/pdfx-incomplete-cidset-in-some-fonts/474336#474336
\ifluatex
\pdfvariable omitcidset=1
\fi
\RequirePackage[a-2b]{pdfx}
%\pdfobjcompresslevel=0 %uncomment for Texlive
\usepackage[pdfa,bookmarks=false]{hyperref} %bookmarks are incompatible with PDF/X<6
\usepackage{hyperxmp}[2020/06/15]
\usepackage{cmap}
\usepackage[cmyk,hyperref]{xcolor}
\ifxetex
\def\OBJ@CMYK{@colorprofile}%
\immediate\special{pdf:fstream \OBJ@CMYK (FOGRA39L_coated.icc) <</N 4>>}%
\def\pdfcatalog#1{\special{pdf:put @catalog <<#1>>}}
\def\pdfpageattr#1{\special{pdf:put @thispage <<#1>>}}
\else
\immediate\pdfobj stream attr{/N 4} file {FOGRA39L_coated.icc}%
\edef\OBJ@CMYK{\the\pdflastobj\space 0 R}%
\fi
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \OBJ@CMYK
/OutputConditionIdentifier (Coated FOGRA39)
/Info(FOGRA39L)
/OutputCondition(Offset printing, according to ISO 12647-2:2004/Amd 1, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, tone value increase curves A (CMY) and B (K))
/RegistryName(http://www.fogra.org)
>>
<<
/Type /OutputIntent
/S/GTS_PDFX
/DestOutputProfile \OBJ@CMYK
/OutputConditionIdentifier (Coated FOGRA39)
/Info(FOGRA39L)
/OutputCondition(Offset printing, according to ISO 12647-2:2004/Amd 1, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, tone value increase curves A (CMY) and B (K))
/RegistryName(http://www.fogra.org)
>> ]
}
% Bugfix of hyperref to produce CMYK links
\let\HyColor@HyperrefBorderColor\HyColor@XZeroOneThreeFour
%we need to tell PDF/X the final format of the paper. This needs adjustment if you want graphics on the page border, called bleeding
\@tempdima=0.99626400996264009962\paperwidth
\edef\boxwd{\strip@pt\@tempdima}
\@tempdima=0.99626400996264009962\paperheight
\edef\boxht{\strip@pt\@tempdima}
\edef\next{%
\protect\pdfpageattr{
/TrimBox[0.0 0.0 \boxwd\space \boxht]
}%
}
\next
\hypersetup{%
pdfdisplaydoctitle=true,
pdftrapped=False,
pdfapart=2,
pdfaconformance=B,
pdfuapart=1,
pdfxstandard={PDF/X-4},
}
%%%%%%%%%% end PDF/A support
\RequirePackage{color}
\RequirePackage{xcolor}
\RequirePackage{pdfpages}
\RequirePackage{tikz}
\RequirePackage{pbox}
\RequirePackage{ifthen}
\RequirePackage{geometry}
\RequirePackage{hyperref}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{etoolbox}
......@@ -619,7 +674,7 @@
\liuthesisabstract
\end{justify}
\vfill
\includegraphics[width=35mm]{liu_primary_black_en_rgb}
\includegraphics[width=35mm]{liu_primary_black_en}
\\[15mm]
\@division\\
\@departmentenglish\\
......@@ -659,7 +714,7 @@
\begin{flushleft}
Nyckelord: \@keywordsswedish\\[3mm]
\end{flushleft}
\includegraphics[width=35mm]{liu_primary_black_sv_rgb}\\
\includegraphics[width=35mm]{liu_primary_black_sv}\\
\@department\\
Linköpings universitet, 581 83 Linköping\\[5mm]
ISBN \@isbnprint{} (tryckt)\hspace{15mm} ISBN \@isbnpdf{} (PDF)\\
......@@ -691,7 +746,7 @@
\begin{flushleft}
Keywords: \@keywords\\[3mm]
\end{flushleft}
\includegraphics[width=35mm]{liu_primary_black_en_rgb} \\
\includegraphics[width=35mm]{liu_primary_black_en} \\
\@departmentenglish\\
Linköping University, SE--581 83 Linköping, Sweden\\[5mm]
ISBN \@isbnprint{} (print)\hspace{15mm} ISBN \@isbnpdf{} (PDF)\\
......@@ -765,7 +820,7 @@
\vfill{}
\begin{textblock*}{\textwidth}(2cm,\paperheight-4cm)
\swedishenglish{\gdef\@langlogo{sv}}{\gdef\@langlogo{en}}
\parbox{0.4\textwidth}{\includegraphics[width=85mm]{liu_primary_black_\@langlogo_rgb}}%
\parbox{0.4\textwidth}{\includegraphics[width=85mm]{liu_primary_black_\@langlogo}}%
\hspace*{32mm}
\parbox{0.5\textwidth}{\raggedleft%
\vspace*{4mm}
......@@ -793,7 +848,7 @@
{\Large\bfseries\@author}\\
\vfill
\swedishenglish{\gdef\@langlogo{sv}}{\gdef\@langlogo{en}}
\includegraphics[width=60mm]{liu_primary_black_\@langlogo_rgb}
\includegraphics[width=60mm]{liu_primary_black_\@langlogo}
\\[12mm]
{\footnotesize
\swedishenglish{%
......
pdftopdfa 0 → 100755
#! /usr/bin/env bash
filename=$(basename $1 .pdf)
gs -dPDFA -dBATCH -dNOPAUSE \
-sColorConversionStrategy=UseDeviceIndependentColor \
-sDEVICE=pdfwrite -dPDFACompatibilityPolicy=2 \
-sOutputFile=$filename-pdfa.pdf \
$1
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment