# Weird warning using pdfx

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}

%-----------------------------
\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.
-
What TeX distribution are you using? Can you add the first few lines of the .log file? –  egreg Dec 22 '12 at 13:16
yeah... This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/W32TeX) (format=pdflatex 2012.11.19) 22 DEC 2012 13:58 –  Mazzy Dec 22 '12 at 13:21
Well, the \sep after RNLC seems to be the cause for the error. –  egreg Dec 22 '12 at 13:30
No unfortunately after removing \sep I got the same error –  Mazzy Dec 22 '12 at 13:31
Remove the .xmpdata file and retry. It works for me. –  egreg Dec 22 '12 at 13:33

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. Package pdfx 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:

\RequirePackage{pdf14}% also disables \pdfobjcompresslevel
\documentclass[...]{...}
...
\usepackage[a-1b]{pdfx}

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:

! pdfTeX error (setup): \pdfminorversion cannot be changed after data is written to the PDF file.
-
thanks too much... I don't receive anymore that warning...but the file still doesn't respect the standard of pdf/a infact validating it with adobe XI I still got error –  Mazzy Dec 22 '12 at 14:15
I add a pic shows the error I got –  Mazzy Dec 22 '12 at 14:19
@Mazzy That's a different question that you have already asked here. –  Heiko Oberdiek Dec 22 '12 at 14:27
yes...ok I will posted here... –  Mazzy Dec 22 '12 at 14:28