Bugs item #1751, was opened at 2008-06-23 09:28 Status: Open Priority: 3 Submitted By: Stefan Becuwe (sbecuwe) Assigned to: Martin Schröder (oneiros) Summary: bounding box ignored? Resolution: Accepted Group: v1.40.3 Category: PDF inclusion Initial Comment: Hello, I've got a problem with a pdf inclusion using includegraphics. I've made a screendump with Firefox using the "Print to File" option and selected pdf as format. Using Acrobat, I've cropped the figure. In kpdf or acroread the result (attached) looks ok. However, when I create a LaTeX document containing this figure, the output depends on the viewer...: correct output shown in kpdf, incorrect output shown in acroread since cropping is ignored. I also get the following message: PDF inclusion: Page Group detected which pdfTeX can't handle. Ignoring it. I don't know whether it's related to the above problem. Best regards Stefan ----------------------------------------------------------------------
Comment By: The Thanh Han (hanthethanh) Date: 2008-06-25 08:33
Message:
I am of the same opinion as Heiko. The reason why content streams are copied entirely is that I didn't expect those streams to contain anything else apart from entries commond for all streams (eg those listed in table 3.4 in pdf spec). However, I also could not find anything explicitly saying that additional entries are not allowed.
Heiko's patch looks good to me. So, here is my vote for that patch. Better to copy only what is required, than to copy everything including what is undefined.
Variant A looks simple and clean, but it will slow down pdf inclusion, since the streams must be uncompressed and re-compressed.
----------------------------------------------------------------------
Comment By: Martin Schröder (oneiros)
Date: 2008-06-25 08:28
Message:
Thanks. This file is IMHO broken: Object 3 is an XObject dict, but is used for the Contents of page 1 (object 23). Can you please file a bug report against FireFox at https://bugzilla.mozilla.org/ and report the bug url here, so that I can chime in there?
----------------------------------------------------------------------
Comment By: Stefan Becuwe (sbecuwe)
Date: 2008-06-25 08:05
Message:
I've attached the original output from Firefox 3.
Regards
Stefan
----------------------------------------------------------------------
Comment By: Martin Schröder (oneiros)
Date: 2008-06-25 07:02
Message:
Of course the stream dict may contain arbitrary keys; but the input PDF here is IMHO broken; at least it's a borderline case (who needs a /BBox or /Group in a stream dict?).
----------------------------------------------------------------------
Comment By: Heiko Oberdiek (oberdiek)
Date: 2008-06-24 22:34
Message:
The /Contents stream object may contain additional
entries, I haven't found something in the PDF specification
that would forbid this.
Therefore the PDF inclusion code needs fixing. Instead
of copying the whole dictionary, this should be limited
to /Length, /Filter, and /DecodeParms. (I assume
external streams aren't supported.)
Patch 1812 contains a patch for pdftoepdf.cc.
The commented variant A recompresses the stream,
controlled by \pdfcompresslevel. Variant B is more
complicate, it copies the needed entries manually
and copies the stream without recompressing.
Yours sincerely
Heiko