<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I have a PDF with a TrimBox and a CropBox that do not start at the origin.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It looks pdftotext -bbox writes the maximum extent of the MediaBox into the <page> element instead of writing the page size.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can I submit a patch to change it, or to add an option to change it, or to write more values in the <page width=... depth=...> line?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
For example, I have a pdf where pdfinfo -box says</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Page size: 84.95 x 2210.75 pts
<div>Page rot: 0</div>
<div>MediaBox: 0.00 0.00 84.95 2310.50</div>
<div>CropBox: 0.00 99.75 84.95 2310.50</div>
<div>BleedBox: 0.00 99.75 84.95 2310.50</div>
<div>TrimBox: 0.00 99.75 84.95 2310.50</div>
<div>ArtBox: 0.00 99.75 84.95 2310.50</div>
but pdftotext -bbox writes</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<page width="84.950000" height="2310.500000"><br>
<word xMin="13.350000" yMin="0.322500" xMax="34.018450" yMax="6.466000">NOTICE</word><br>
...</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<word xMin="22.548900" yMin="2197.922500" xMax="36.779600" yMax="2204.066000">2010)</word>
<div> </page></div>
so when I assemble the page from the words, I have an extra 99.75 points of empty space at the bottom.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards, William</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>