summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormycroft <mycroft@pkgsrc.org>2000-04-15 18:36:22 +0000
committermycroft <mycroft@pkgsrc.org>2000-04-15 18:36:22 +0000
commit865e34791460e793a8cd98f65a9a262ab6201cf2 (patch)
tree1950eac1170855b1f9eebe170d50939c699c2e29
parent6dd4923307267065fb203374f786ea417f33299f (diff)
downloadpkgsrc-865e34791460e793a8cd98f65a9a262ab6201cf2.tar.gz
Fix two problems in pdf2dsc.ps:
* If there is no CropBox for a page, look for a MediaBox instead. * Make sure the PageBoundingBox is always expressed in integral numbers. This allows gv to resize properly when viewing PDF files.
-rw-r--r--print/ghostscript5/patches/patch-ak22
1 files changed, 22 insertions, 0 deletions
diff --git a/print/ghostscript5/patches/patch-ak b/print/ghostscript5/patches/patch-ak
new file mode 100644
index 00000000000..5380faacab3
--- /dev/null
+++ b/print/ghostscript5/patches/patch-ak
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.1 2000/04/15 18:36:22 mycroft Exp $
+
+--- pdf2dsc.ps.orig Sat Jul 19 12:59:16 1997
++++ pdf2dsc.ps Sat Apr 15 13:54:00 2000
+@@ -92,9 +92,15 @@
+ %BEGIN ##jp##
+ dup pdfgetpage /CropBox knownoget { % file maxpage pageno cropbox
+ DSCfile (%%PageBoundingBox: ) writestring
+- {DSCfile exch write=only DSCfile ( ) writestring} forall
++ {DSCfile exch round cvi write=only DSCfile ( ) writestring} forall
+ DSCfile (\n) writestring
+-} if
++} {
++ dup pdfgetpage /MediaBox knownoget { % file maxpage pageno cropbox
++ DSCfile (%%PageBoundingBox: ) writestring
++ {DSCfile exch round cvi write=only DSCfile ( ) writestring} forall
++ DSCfile (\n) writestring
++ } if
++} ifelse
+ dup pdfgetpage /Rotate knownoget { % file maxpage pageno angle
+ DSCfile (%%PageOrientation: ) writestring
+ 90 div cvi 4 mod dup 0 lt {4 add} if