I got this strange warning:
\pdfobjcompresslevel > 0 requires \pdfminorversion > 4. Object streams disabled now.
using pdfx
package.
Here it is a MWE:
\documentclass[12pt,a4paper,twoside,openright]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[hmargin=3cm,vmargin=3cm,bindingoffset=0.5cm]{geometry}
\usepackage{setspace} %setta l'interlinea a 1,5
\onehalfspacing
\usepackage{lipsum}
%PDF METADATA
%-----------------------------
\usepackage[a-1b]{pdfx}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.xmpdata}
\Title{Title}
\Author{Author}
\Keywords{Mobile Cloud\sep
Energia\sep
Green Networking\sep
Network Coding\sep
User Cooperation\sep
RLNC\sep}
\Org{Università degli Studi di Catania}
\end{filecontents*}
%-----------------------------
\begin{document}
\lipsum[1-4]
\end{document
here it is the error I got:
I also validate the file with online validator this is the result:
Validating file "prova.pdf" for conformance level pdfa-1b
The separator after an 'obj' must be an EOL. (2)
The separator before an 'endobj' must be an EOL. (2)
The separator before 'endstream' must be an EOL.
XML line 21:27: Input is not proper UTF-
Bytes: 0xE0 0x20 0x64 0x65.", 1
The value of the key N is 4 but must be 3.
The document does not conform to the requested standard.
The file format (header, trailer, objects, xref, streams) is corrupted.
The document doesn't conform to the PDF reference (missing required entries, wrong value types, etc.).
The document's meta data is either missing or inconsistent or corrupt.
Done.
Best Answer
It is a bug in package
pdfx
. PDF/A uses PDF version 1.4. The default for pdfTeX is 1.5 nowadays that allows object stream compression that is not available in 1.4. Packagepdfx
sets version 1.4, but forgets about\pdfobjcompresslevel
. Then pdfTeX complains, if the first object is written to the PDF file.Workaround and solution by using package
pdf14
right at the beginning:Anyway, the setting of the PDF version should be done at the very beginning. Some packages already write PDF objects, then the version number is already written (at the start of the PDF file) and pdfTeX would abort with an error, if the version is changed afterwards: