For -Tps2, set page size to be the same as the figure. This has
authorerg <devnull@localhost>
Thu, 17 Nov 2005 21:59:37 +0000 (21:59 +0000)
committererg <devnull@localhost>
Thu, 17 Nov 2005 21:59:37 +0000 (21:59 +0000)
no effect on small figures included in documents, while allowing
big graphs to be browsed using acroread.

lib/common/psgen.c

index 7d4ca406c3a0c4aae2bb1ba9594e7009790d6363..64bc5af2b3f58dc4d95ca5db6cf8c511238a1c10 100644 (file)
@@ -166,6 +166,9 @@ fprintf(stderr,"offset = %d,%d\n", offset.x, offset.y);
            PB.LL.x, PB.LL.y, PB.UR.x, PB.UR.y);
     fprintf(Output_file, "%%%%PageOrientation: %s\n",
            (rot ? "Landscape" : "Portrait"));
+    if (Output_lang == PDF)
+       fprintf(Output_file, "<< /PageSize [%d %d] >> setpagedevice\n",
+           PB.UR.x - PB.LL.x, PB.UR.y - PB.LL.y);
     if (Show_boxes == NULL)
        fprintf(Output_file, "gsave\n%d %d %d %d boxprim clip newpath\n",
            0, 0, sz.x, sz.y);