Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
liuthesis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timothy Lundgren
liuthesis
Commits
0ba194b9
Commit
0ba194b9
authored
3 years ago
by
Jan-Åke Larsson
Committed by
Ola Leifler
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add rudimentary PDF/A-2b support
parent
f820a22d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
liuthesis.cls
+62
-3
62 additions, 3 deletions
liuthesis.cls
pdftopdfa
+7
-0
7 additions, 0 deletions
pdftopdfa
scigen-orig.pdf
+0
-0
0 additions, 0 deletions
scigen-orig.pdf
scigen.pdf
+0
-0
0 additions, 0 deletions
scigen.pdf
with
69 additions
and
3 deletions
liuthesis.cls
+
62
−
3
View file @
0ba194b9
...
...
@@ -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
}
...
...
@@ -301,14 +302,72 @@
\LoadClass
{
memoir
}
\RequirePackage
{
color
}
\RequirePackage
[svgnames]
{
xcolor
}
\RequirePackage
[cmyk,svgnames,hyperref]
{
xcolor
}
\RequirePackage
{
pdfpages
}
\RequirePackage
{
tikz
}
\RequirePackage
{
pbox
}
\RequirePackage
{
ifthen
}
\RequirePackage
{
geometry
}
\RequirePackage
[pdfusetitle]
{
hyperref
}
%%%%%%%%%% PDF/A and PDF/X support
% https://tex.stackexchange.com/questions/474197/pdfx-incomplete-cidset-in-some-fonts/474336#474336
\ifluatex
\pdfvariable
omitcidset=1
\fi
\RequirePackage
[pdfa,pdfusetitle,bookmarks=false]
{
hyperref
}
%bookmarks are incompatible with PDF/X<6
\RequirePackage
{
hyperxmp
}
[2020/06/15]
\RequirePackage
{
cmap
}
\RequirePackage
{
colorprofiles
}
\ifxetex
\def\OBJ
@CMYK
{
@colorprofile
}
%
\immediate\special
{
pdf:fstream
\OBJ
@CMYK (
\colorpro
@cmyk@profile) <</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
{
\colorpro
@cmyk@profile
}
%
\edef\OBJ
@CMYK
{
\the\pdflastobj\space
0 R
}
%
\fi
\pdfcatalog
{
%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS
_
PDFA1
/DestOutputProfile
\OBJ
@CMYK
/OutputConditionIdentifier (
\colorpro
@cmyk@intent)
/Info(FOGRA39L)
/OutputCondition(
\colorpro
@cmyk@identifier)
/RegistryName(
\colorpro
@cmyk@registry)
>>
<<
/Type /OutputIntent
/S/GTS
_
PDFX
/DestOutputProfile
\OBJ
@CMYK
/OutputConditionIdentifier (
\colorpro
@cmyk@intent)
/Info(FOGRA39L)
/OutputCondition(
\colorpro
@cmyk@identifier)
/RegistryName(
\colorpro
@cmyk@registry)
>> ]
}
% Bugfix of hyperref to produce CMYK links
\let\HyColor
@HyperrefBorderColor
\HyColor
@XZeroOneThreeFour
% Tell PDF/X the final format of the paper
\@
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 and PDF/X support
\RequirePackage
{
amssymb
}
\RequirePackage
{
amsmath
}
\RequirePackage
{
etoolbox
}
...
...
This diff is collapsed.
Click to expand it.
pdftopdfa
0 → 100755
+
7
−
0
View file @
0ba194b9
#! /usr/bin/env bash
filename
=
$(
basename
$1
.pdf
)
gs
-dPDFA
-dBATCH
-dNOPAUSE
\
-sColorConversionStrategy
=
UseDeviceIndependentColor
\
-sDEVICE
=
pdfwrite
-dPDFACompatibilityPolicy
=
2
\
-sOutputFile
=
$filename
-pdfa
.pdf
\
$1
This diff is collapsed.
Click to expand it.
scigen-orig.pdf
0 → 100644
+
0
−
0
View file @
0ba194b9
File added
This diff is collapsed.
Click to expand it.
scigen.pdf
+
0
−
0
View file @
0ba194b9
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment