diff options
author | mycroft <mycroft@pkgsrc.org> | 2000-04-15 18:36:22 +0000 |
---|---|---|
committer | mycroft <mycroft@pkgsrc.org> | 2000-04-15 18:36:22 +0000 |
commit | 865e34791460e793a8cd98f65a9a262ab6201cf2 (patch) | |
tree | 1950eac1170855b1f9eebe170d50939c699c2e29 /print | |
parent | 6dd4923307267065fb203374f786ea417f33299f (diff) | |
download | pkgsrc-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.
Diffstat (limited to 'print')
-rw-r--r-- | print/ghostscript5/patches/patch-ak | 22 |
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 |