[gs-cvs] gs/lib

Russell Lang ghostgum at casper.ghostscript.com
Thu Jul 18 03:46:08 PDT 2002


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

Modified Files:
	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.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- pdf_main.ps	1 Jul 2002 10:49:38 -0000	1.53
+++ pdf_main.ps	18 Jul 2002 10:46:06 -0000	1.54
@@ -623,8 +623,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
@@ -640,9 +640,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