static void psgen_begin_page(GVJ_t * job)
{
box pbr = job->pageBoundingBox;
- point sz;
// FIXME
point page = {0,0};
int N_pages = 0;
- sz.x = pbr.UR.x - pbr.LL.x;
- sz.y = pbr.UR.y - pbr.LL.y;
fprintf(job->output_file, "%%%%Page: %d %d\n",
job->common->viewNum + 1, job->common->viewNum + 1);
if (job->common->show_boxes == NULL)
(job->rotation ? "Landscape" : "Portrait"));
if (job->render.id == FORMAT_PS2)
fprintf(job->output_file, "<< /PageSize [%d %d] >> setpagedevice\n",
- sz.x, sz.y);
+ pbr.UR.x, pbr.UR.y);
if (job->common->show_boxes == NULL)
fprintf(job->output_file, "gsave\n%d %d %d %d boxprim clip newpath\n",
- pbr.LL.x, pbr.LL.y, sz.x, sz.y);
+ pbr.LL.x, pbr.LL.y, pbr.UR.x, pbr.UR.y);
fprintf(job->output_file, "%d %d %d beginpage\n", page.x, page.y, N_pages);
fprintf(job->output_file, "%g %g set_scale %d rotate %g %g translate\n",
job->scale.x, job->scale.y,
/* Define the size of the PS canvas */
if (job->render.id == FORMAT_PS2) {
- if (sz.x >= PDFMAX || sz.y >= PDFMAX)
+ if (pbr.UR.x >= PDFMAX || pbr.UR.y >= PDFMAX)
job->common->errorfn("canvas size (%d,%d) exceeds PDF limit (%d)\n"
"\t(suggest setting a bounding box size, see dot(1))\n",
- sz.x, sz.y, PDFMAX);
+ pbr.UR.x, pbr.UR.y, PDFMAX);
fprintf(job->output_file, "[ /CropBox [%d %d %d %d] /PAGES pdfmark\n",
pbr.LL.x, pbr.LL.y, pbr.UR.x, pbr.UR.y);
}