summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2021-03-10 09:11:08 -0800
committerRay Johnston <ray.johnston@artifex.com>2021-03-10 09:11:08 -0800
commit5e90d4b7fa77dc710e6ff2b1955f6098c24e4bca (patch)
treedb8252d5c0f1af9b9f07cdb59d5fecad085e8891 /lib
parent69c909b087376970d24e92e7b479f1981b94f070 (diff)
downloadghostpdl-5e90d4b7fa77dc710e6ff2b1955f6098c24e4bca.tar.gz
Fix rangecheck from pdf_info when -dDumpXML is used and lines are > 256 bytes.
Just dump the XML metadata rather than trying to suppress blank lines.
Diffstat (limited to 'lib')
-rw-r--r--lib/pdf_info.ps17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/pdf_info.ps b/lib/pdf_info.ps
index 5095130c6..55beaa978 100644
--- a/lib/pdf_info.ps
+++ b/lib/pdf_info.ps
@@ -167,19 +167,6 @@ cleartomark % discard the dict from --where--
} ifelse
} bind def
-/printXML { % <string> printXML -
- % print non-blank lines without trailing spaces
- dup dup length 1 sub -1 0 {
- 1 index 1 index get 32 eq {
- 0 exch getinterval exch
- } {
- exch = exit % non-blank on this line
- }
- ifelse
- } for
- pop pop % clean up
-} bind def
-
/dump-pdf-info { % (fname) -> -
() = ( ) print print ( has ) print
PDFPageCount dup =print 10 mod 1 eq { ( page.\n) } { ( pages\n) } ifelse = flush
@@ -195,9 +182,9 @@ cleartomark % discard the dict from --where--
pop
Trailer /Root oget /Metadata knownoget {
//false resolvestream
- { dup 256 string readline exch printXML not { exit } if } loop
+ { dup 256 string readstring exch print not { exit } if } loop
pop % done with the stream
- (_____________________________________________________________) =
+ (\n_____________________________________________________________) =
flush
} if
} if