[gs-cvs] gs/lib

Russell Lang ghostgum at casper.ghostscript.com
Thu Jul 18 03:45:44 PDT 2002


Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv12567/lib

Modified Files:
      Tag: GS_7_0X
	pdf_main.ps 
Log Message:
Fix: When using -dUseCropBox, use an inherited CropBox.
The previous fix would only use a CropBox on the page
being displayed.


Index: pdf_main.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_main.ps,v
retrieving revision 1.35.2.4
retrieving revision 1.35.2.5
diff -u -d -r1.35.2.4 -r1.35.2.5
--- pdf_main.ps	28 Jun 2002 23:13:06 -0000	1.35.2.4
+++ pdf_main.ps	18 Jul 2002 10:45:42 -0000	1.35.2.5
@@ -601,8 +601,8 @@
 	% We would like to clip to the CropBox here, but the subsequent
 	% initgraphics would override it.  Instead, we have to handle it
 	% in graphicsbeginpage.
-  dup /CropBox known systemdict /UseCropBox known and {
-    dup /CropBox get dup 0 get neg exch 1 get neg translate
+  dup /CropBox pget dup {exch pop} if systemdict /UseCropBox known and {
+    dup /CropBox pget pop dup 0 get neg exch 1 get neg translate
   } {
     dup /MediaBox pget {
       dup 0 get neg exch 1 get neg translate
@@ -618,9 +618,9 @@
 	% Rotate specifies *clockwise* rotation!
     neg 3 and def
 	% Stack: pagedict currentpagedict
-  1 index /CropBox known systemdict /UseCropBox known and {
+  1 index /CropBox pget dup {exch pop} if systemdict /UseCropBox known and {
 			% Set the page size.
-    1 index /CropBox get
+    1 index /CropBox pget pop
     boxrect 2 array astore /PageSize exch def pop pop
   } {
     1 index /MediaBox pget {




More information about the gs-cvs mailing list