[pdftex] [Tex] very subtle endobj bug in latest pdftex

Reinhard Kotucha reinhard.kotucha at web.de
Sun Jun 29 00:26:02 CEST 2014


On 2014-06-24 at 09:10:47 +1000, Ross Moore wrote:

 > But Reinhard makes an interesting point.
 > Maybe if I use Acrobat Pro to Save As...  PDF/A then the
 > line-ends will be changed from \r  to \n  and this
 > problem can be avoided?

Hi Ross,
did you consider to try Ghostscript?  Despite of its name, ps2pdf
can read PDF files.

---------------------------------------------------
#!/bin/sh

OUTPUTFILE=${1%%.pdf}-icc.pdf

GS_OPTS = -dPDFA=1 \
          -dUseCIEColor \
          -sProcessColorModel=DeviceCMYK

ps2pdf --gsopts=${GS_OPTS} -o ${OUTPUTFILE} $1
---------------------------------------------------

The preferred version of Ghostscript is 9.10 because the color
management system is quite new and 9.13 breaks hyperref.

 > Unfortunately it compresses,

Ghostscript supports the options

 -dCompressPages=false
 -dCompressFonts=false

 > Also, it seems to have changed the colors somewhat.

In such cases I convert PDF to PostScript (using Ghostscript) and
reverse-engineer the PostScript file.  Did you encounter this problem
with JPEG/PNG files or with vector graphics?  If colors are changed in
vector graphics, could you send me the files?

If the files are created by LaTeX, it's helpful to avoid any text
(fonts) and to add these lines to the preamble:

  \pdfcompresslevel=0
  \pagestyle{empty}

BTW, you are providing plenty of files which differ only in a few
lines.  The ideal solution in respect of maintainability is to derive
them all from a single .dtx file.  I recently told you that it doesn't
work because TeX translates the bytes of the BOM to its ^^-syntax.

Fortunately I met Heiko Oberdiek at the Dante Conference in April and
he told me that it works if the -8bit option is used, for instance

  tex -8bit pdfx.ins

I tried it with my test file and it works like a charm.  Vim displays

  <?xpacket begin="<feff>" id="W5M0MpCehiHzreSzNTczkc9d"?>

Without the -8bit option I get

  <?xpacket begin="^^ef^^bb^^bf" id="W5M0MpCehiHzreSzNTczkc9d"?>

Hence I think that deriving everything from a single .dtx file is
feasible and I'm conviced that it's easier to maintain this way.

You posted the pdfx package to the list some time ago.  Could you
provide an update?

BTW, I'm glad that all free validators are happy now with the stuff
I created with LuaTeX.  The only exception is the Pdftron validator
which complains that "CIDSet is incomplete".  I reverse-engineerd the
output of LuaTeX and came to the conclusion that it's compliant with
the standard.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------



More information about the pdftex mailing list