From: erg Date: Thu, 17 Nov 2005 21:59:37 +0000 (+0000) Subject: For -Tps2, set page size to be the same as the figure. This has X-Git-Tag: LAST_LIBGRAPH~32^2~6964 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cabecea6ab59b32b2218da3487436393b4892ee6;p=graphviz For -Tps2, set page size to be the same as the figure. This has no effect on small figures included in documents, while allowing big graphs to be browsed using acroread. --- diff --git a/lib/common/psgen.c b/lib/common/psgen.c index 7d4ca406c..64bc5af2b 100644 --- a/lib/common/psgen.c +++ b/lib/common/psgen.c @@ -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);