diff options
Diffstat (limited to 'Master/tlpkg/tlgs/lib/pdfwrite.ps')
-rw-r--r-- | Master/tlpkg/tlgs/lib/pdfwrite.ps | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Master/tlpkg/tlgs/lib/pdfwrite.ps b/Master/tlpkg/tlgs/lib/pdfwrite.ps index 9d4c51d78eb..33751f2da05 100644 --- a/Master/tlpkg/tlgs/lib/pdfwrite.ps +++ b/Master/tlpkg/tlgs/lib/pdfwrite.ps @@ -1,19 +1,19 @@ % Copyright (C) 1999, 2000, 2001 Aladdin Enterprises. All rights reserved. -% +% % This software is provided AS-IS with no warranty, either express or % implied. -% +% % This software is distributed under license and may not be copied, % modified or distributed except as expressly authorized under the terms % of the license contained in the file LICENSE in this distribution. -% +% % For more information about licensing, please refer to % http://www.ghostscript.com/licensing/. For information on % commercial licensing, go to http://www.artifex.com/licensing/ or % contact Artifex Software, Inc., 101 Lucas Valley Road #110, % San Rafael, CA 94903, U.S.A., +1(415)492-9861. -% $Id: pdfwrite.ps 9246 2008-11-27 01:58:54Z alexcher $ +% $Id$ % Writer for transmuting PDF files. % NOTES: @@ -58,7 +58,7 @@ put put } ifelse % - } bind def - + /ld_known { % <ldict> <key> ld_known <bool> dup 3 1 roll -15 bitshift % key <<>> key<<15 2 copy known { @@ -67,7 +67,7 @@ pop pop pop //false } ifelse } bind def - + /ld_knownget { % <ldict> <key> ld_known false | <any> true dup 3 1 roll -15 bitshift % key <<>> key<<15 2 copy known { @@ -175,8 +175,8 @@ readonly def dup xcheck { aload pop //pdfwriteprocs exch get exec } { - % Because of a bug in Acrobat's parser for linearization parameters, - % we have to include some whitespace after the opening [ (!). + % Because of a bug in Acrobat's parser for linearization parameters, + % we have to include some whitespace after the opening [ (!). ([ ) ows { pdfwritevalue (\n) ows } forall (]) ows } ifelse } bind def @@ -208,10 +208,10 @@ readonly def /pdfcopystring 200 string def /pdfwritestream { % <streamdict> pdfwritestream - - % Remove File, FilePosition, and StreamKey; - % optimize by replacing an indirect Length. + % Remove File, FilePosition, and StreamKey; + % optimize by replacing an indirect Length. dup dup length dict copy - % Stack: origdict dict + % Stack: origdict dict dup /File undef dup /FilePosition undef dup /StreamKey undef dup /Length known { dup /Length get dup oforce ne { @@ -240,7 +240,7 @@ readonly def } loop pop pop pop } bind def /pdfcopystream { % <newstreamdict> <file> pdfcopystream - - % (file has been positioned) + % (file has been positioned) 1 index pdfwritevalue (stream\n) ows exch /Length get OFile exch pdfcopybytes (endstream) ows @@ -249,7 +249,7 @@ readonly def % ---------------- General values/objects ---------------- % /pdfwritetypes mark - % Scalars + % Scalars /nulltype { pop (null) ows } bind /integertype { =string cvs ows } bind /booleantype 1 index @@ -286,7 +286,7 @@ readonly def } bind /stringtype { OFile exch write===only } bind /nametype { pdfwritename } bind - % Composite/reference objects + % Composite/reference objects /arraytype { pdfwritearray } bind /packedarraytype 1 index /dicttype { pdfwritedict } bind @@ -338,7 +338,7 @@ readonly def (trailer\n) ows % Since we always write a complete "classic" xref, the Trailer may need to be adjusted: % - remove keys that pertain to xref-streams and hybrid-xref PDFs; - % - if it's a PDF stream, turn it into a PDF dict by removing keys used for + % - if it's a PDF stream, turn it into a PDF dict by removing keys used for % PDF streams (both standard and GS-specific), and the executable attribute dup /XRefStm known 1 index xcheck or { dup length dict copy @@ -364,11 +364,11 @@ readonly def /ToWrite 100 dict def omapinit - % Write the PDF file header. + % Write the PDF file header. pdfwriteheader - % Write the objects. + % Write the objects. trailer { exch pop dup xcheck { % The only executable objects are references. @@ -377,13 +377,13 @@ readonly def pop } ifelse } forall - % Walk the object graph. + % Walk the object graph. { ToWrite dup length dup 0 eq { pop pop exit } if 1 sub 2 copy get 3 1 roll undef aload pop pdfwriteobj } loop - % Write the xref table and trailer. + % Write the xref table and trailer. /xref OFile fileposition def 0 XRef ld_length 1 add pdfwritexref |