{ NULL, 0, NULL }
};
+/*** common ***/
+
+class common_cmd : public cmd_exec {
+ vector<page *> process(vector<page *> &pages) override
+ {
+ if (!pages.size())
+ return pages;
+
+ const page *first = pages[0];
+ BBox pbox(first->width, first->height);
+ BBox ibox = first->image_box;
+ for (auto p: pages)
+ {
+ BBox pg(p->width, p->height);
+ pbox.join(pg);
+ ibox.join(p->image_box);
+ }
+
+ vector<page *> out;
+ for (auto p: pages)
+ {
+ page *q = new xform_page(p, pdf_matrix());
+ q->width = pbox.width();
+ q->height = pbox.height();
+ q->image_box = ibox;
+ out.push_back(q);
+ }
+
+ return out;
+ }
+public:
+ common_cmd(cmd *c UNUSED) { }
+};
+
/*** Command table ***/
template<typename T> cmd_exec *ctor(cmd *c) { return new T(c); }
"Prepare booklets for book binding" },
{ "clip", clip_args, 0, &ctor<clip_cmd>,
"Suppress page contents drawn outside the image box" },
+ { "common", no_args, 0, &ctor<common_cmd>,
+ "Use a common page size and image box for all pages" },
{ "cropmarks",cropmarks_args, 0, &ctor<cropmarks_cmd>,
"Draw cropping marks around the image box" },
{ "debug", no_args, 0, &ctor<debug_cmd>,