if (art_box.isNull())
art_box = inpg.getKey("/CropBox");
if (art_box.isNull())
- bbox = BBox(width, height);
+ image_box = BBox(width, height);
else
{
- bbox = BBox(art_box);
- bbox.x_min -= media_box.x_min;
- bbox.x_max -= media_box.x_min;
- bbox.y_min -= media_box.y_min;
- bbox.y_max -= media_box.y_min;
+ image_box = BBox(art_box);
+ image_box.x_min -= media_box.x_min;
+ image_box.x_max -= media_box.x_min;
+ image_box.y_min -= media_box.y_min;
+ image_box.y_max -= media_box.y_min;
}
}
return;
for (auto pg: pages)
- debug("Page #%d: media[%.3f %.3f] bbox[%.3f %.3f %.3f %.3f]",
+ debug("Page #%d: media[%.3f %.3f] image[%.3f %.3f %.3f %.3f]",
pg->index,
pg->width, pg->height,
- pg->bbox.x_min, pg->bbox.y_min, pg->bbox.x_max, pg->bbox.y_max);
+ pg->image_box.x_min, pg->image_box.y_min, pg->image_box.x_max, pg->image_box.y_max);
}
vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages)
out_page.replaceKey("/Type", QPDFObjectHandle::newName("/Page"));
out_page.replaceKey("/MediaBox", BBox(pg->width, pg->height).to_array());
// FIXME:
- // out_page.replaceKey("/CropBox", pg->bbox.to_array());
+ // out_page.replaceKey("/CropBox", pg->image_box.to_array());
out_page.replaceKey("/Contents", contents);
out_page.replaceKey("/Resources", out.resources);
out_pdf.addPage(out_page, false);
die("Ghostscript failed to produce the right number of bboxes");
for (size_t i=0; i<pages.size(); i++)
- pages[i]->bbox = bboxes[i];
+ pages[i]->image_box = bboxes[i];
}