%% hgbpdfa.sty
%% This file is part of the Hagenberg Thesis package for creating bachelors's and masters's theses
%% Author: Wilhelm Burger (wilbur@ieee.org)
%% GitHub: https://github.com/Digital-Media/HagenbergThesis
%% File encoding: ASCII

\ProvidesPackage{hgbpdfa}[2026/10/22]%%AUTO

%% Setup for producing 	PDF/A-2B compliant output using the new LaTeX-internal
%% PDF metadata management features 
%% (see https://ctan.org/tex-archive/macros/latex/contrib/pdfmanagement-testphase).
%% This package should be loaded before \documentclass.

%% Check to see if the new 'pdfmanagement' implementation (starting July 2025)
%% is already available, otherwise fall back to the older 'pdfmanagement-testphase'
%% (currently needed on Overleaf, for example).
\IfFileExists{pdfmanagement.sty}{
	\typeout{*** loading pdfmanagement ***}
	\RequirePackage{pdfmanagement}
	\SetKeys[document/metadata]{pdfversion=1.7,pdfstandard=A-2b}
}{
	\typeout{*** loading pdfmanagement-testphase ***}
	\RequirePackage{pdfmanagement-testphase} % only needed before LaTeX 2022-06-01
	\DeclareDocumentMetadata{pdfversion=1.7,pdfstandard=A-2b}
}

\RequirePackage[T1]{fontenc}	% pdfmanagement requires T1 encoding!
\RequirePackage{lmodern}			% alternatively install(!) cm-super package
