<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
when preparing PDF files for a printing house, a bleed box has to be
included in the file, and the media box has to be increased
appropriately. If I supply a custom MediaBox with \pdfpageattr, the
MediaBox appears twice in the pdf output. It is easy to remove one
MediaBox manually, but this is error prone.<br>
<br>
I've created a minimal example:<br>
<br>
\documentclass{article}
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">\pdfcompresslevel
0</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">\pdfpageattr{</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">/MediaBox
[-8.50394 -8.50394 603.77953 850.39370]^^J</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">/BleedBox
[-8.50394 -8.50394 603.77953 850.39370]^^J</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">/CropBox
[0 0 595.27559 841.88976]^^J</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">/TrimBox
[0.00000 0.00000 595.27559 841.88976]</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">}</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">\begin{document}</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some text.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">\end{document}<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
pdflatex yields:<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">...<br>
<snip><br>
<<<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">/Producer
(pdfTeX-1.40.17)<br>
/Creator (TeX)<br>
/CreationDate (D:20170209130229+01'00')<br>
/ModDate (D:20170209130229+01'00')<br>
/Trapped /False<br>
/PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.17
(TeX Live 2016/W32TeX) kpathsea version 6.2.2)</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">>><br>
</snip><br>
</p>
...<br>
<snip>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><<<br>
/Type /Page<br>
/Contents 3 0 R<br>
/Resources 1 0 R<br>
/MediaBox [0 0 595.276 841.89]<br>
/MediaBox [-8.50394 -8.50394 603.77953 850.39370]<br>
/BleedBox [-8.50394 -8.50394 603.77953 850.39370]<br>
/CropBox [0 0 595.27559 841.88976]<br>
/TrimBox [0.00000 0.00000 595.27559 841.88976] <br>
/Parent 6 0 R<br>
>><br>
</snip><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">...<br>
<br>
</p>
Is this a bug or do I miss something? Is there a way to suppress the
first MediaBox?<br>
<br>
Thanks & BR<br>
<br>
Michael<br>
</body>
</html>