annotate runtime/doc/print.txt @ 31920:f1a5e67e9a1b v9.0.1292

patch 9.0.1292: :defer may call the wrong method for an object Commit: https://github.com/vim/vim/commit/313e4724c3b4f6d7454b45b89da08f83a2a0c77e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 8 20:55:27 2023 +0000 patch 9.0.1292: :defer may call the wrong method for an object Problem: :defer may call the wrong method for an object. (Ernie Rael) Solution: When en object is from a class that extends or implements, figure out the method to call at runtime. (closes #11910)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Feb 2023 22:00:06 +0100
parents f68f43043842
children 4635e43f2c6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30634
f68f43043842 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 30598
diff changeset
1 *print.txt* For Vim version 9.0. Last change: 2022 Oct 01
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
2
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
3
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
5
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
6
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
7 Printing *printing*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
8
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
9 1. Introduction |print-intro|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
10 2. Print options |print-options|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
11 3. PostScript Printing |postscript-printing|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
12 4. PostScript Printing Encoding |postscript-print-encoding|
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
13 5. PostScript CJK Printing |postscript-cjk-printing|
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
14 6. PostScript Printing Troubleshooting |postscript-print-trouble|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
15 7. PostScript Utilities |postscript-print-util|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
16 8. Formfeed Characters |printing-formfeed|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
17
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
18 {only available when compiled with the |+printer| feature}
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
19
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
20 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
21 1. Introduction *print-intro*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
22
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
23 On MS-Windows Vim can print your text on any installed printer. On other
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
24 systems a PostScript file is produced. This can be directly sent to a
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
25 PostScript printer. For other printers a program like ghostscript needs to be
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
26 used.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
27
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
28 Note: If you have problems printing with |:hardcopy|, an alternative is to use
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
29 |:TOhtml| and print the resulting html file from a browser.
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
30
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
31 *:ha* *:hardcopy* *E237* *E238* *E324*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
32 :[range]ha[rdcopy][!] [arguments]
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
33 Send [range] lines (default whole file) to the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
34 printer.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
35
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
36 On MS-Windows a dialog is displayed to allow selection
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 15
diff changeset
37 of printer, paper size etc. To skip the dialog, use
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
38 the [!]. In this case the printer defined by
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
39 'printdevice' is used, or, if 'printdevice' is empty,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
40 the system default printer.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
41
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
42 For systems other than MS-Windows, PostScript is
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
43 written in a temp file and 'printexpr' is used to
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
44 actually print it. Then [arguments] can be used by
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
45 'printexpr' through |v:cmdarg|. Otherwise [arguments]
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
46 is ignored. 'printoptions' can be used to specify
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
47 paper size, duplex, etc.
14519
5c5908e81e93 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
48 Note: If you want PDF, there are tools such as
5c5908e81e93 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
49 "ps2pdf" that can convert the PostScript to PDF.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
50
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
51 :[range]ha[rdcopy][!] >{filename}
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
52 As above, but write the resulting PostScript in file
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
53 {filename}.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
54 Things like "%" are expanded |cmdline-special|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
55 Careful: An existing file is silently overwritten.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
56 {only available when compiled with the |+postscript|
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
57 feature}
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
58 On MS-Windows use the "print to file" feature of the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
59 printer driver.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
60
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
61 Progress is displayed during printing as a page number and a percentage. To
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
62 abort printing use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
63
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
64 Printer output is controlled by the 'printfont' and 'printoptions' options.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
65 'printheader' specifies the format of a page header.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
66
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
67 The printed file is always limited to the selected margins, irrespective of
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
68 the current window's 'wrap' or 'linebreak' settings. The "wrap" item in
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
69 'printoptions' can be used to switch wrapping off.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
70 The current highlighting colors are used in the printout, with the following
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
71 considerations:
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 15
diff changeset
72 1) The normal background is always rendered as white (i.e. blank paper).
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
73 2) White text or the default foreground is rendered as black, so that it shows
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
74 up!
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
75 3) If 'background' is "dark", then the colours are darkened to compensate for
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
76 the fact that otherwise they would be too bright to show up clearly on
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
77 white paper.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
78
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
79 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
80 2. Print options *print-options*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
81
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
82 Here are the details for the options that change the way printing is done.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
83 For generic info about setting options see |options.txt|.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
84
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
85 *pdev-option*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
86 'printdevice' 'pdev' string (default empty)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
87 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
88 This defines the name of the printer to be used when the |:hardcopy| command
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
89 is issued with a bang (!) to skip the printer selection dialog. On Win32, it
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
90 should be the printer name exactly as it appears in the standard printer
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
91 dialog.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
92 If the option is empty, then vim will use the system default printer for
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
93 ":hardcopy!"
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
94
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
95 *penc-option* *E620*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
96 'printencoding' 'penc' String (default empty, except for:
18912
ccd16426a1f9 patch 8.2.0017: OS/2 and MS-DOS are still mentioned
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
97 MS-Windows: cp1252,
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
98 Macintosh: mac-roman,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
99 VMS: dec-mcs,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
100 HPUX: hp-roman8,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
101 EBCDIC: ebcdic-uk)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
102 global
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
103 Sets the character encoding used when printing. This option tells Vim which
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
104 print character encoding file from the "print" directory in 'runtimepath' to
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
105 use.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
106
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
107 This option will accept any value from |encoding-names|. Any recognized names
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
108 are converted to Vim standard names - see 'encoding' for more details. Names
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
109 not recognized by Vim will just be converted to lower case and underscores
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
110 replaced with '-' signs.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
111
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
112 If 'printencoding' is empty or Vim cannot find the file then it will use
15878
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
113 'encoding' (if it is set an 8-bit encoding) to find the print character
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
114 encoding file. If Vim is unable to find a character encoding file then it
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
115 will use the "latin1" print character encoding file.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
116
21991
bbca88cd13d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
117 When 'encoding' is set to a multibyte encoding, Vim will try to convert
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
118 characters to the printing encoding for printing (if 'printencoding' is empty
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
119 then the conversion will be to latin1). Conversion to a printing encoding
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
120 other than latin1 will require Vim to be compiled with the |+iconv| feature.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
121 If no conversion is possible then printing will fail. Any characters that
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
122 cannot be converted will be replaced with upside down question marks.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
123
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
124 Four print character encoding files are provided to support default Mac, VMS,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
125 HPUX, and EBCDIC character encodings and are used by default on these
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
126 platforms. Code page 1252 print character encoding is used by default on
18912
ccd16426a1f9 patch 8.2.0017: OS/2 and MS-DOS are still mentioned
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
127 MS-Windows platform.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
128
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
129 *pexpr-option*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
130 'printexpr' 'pexpr' String (default: see below)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
131 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
132 Expression that is evaluated to print the PostScript produced with
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
133 |:hardcopy|.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
134 The file name to be printed is in |v:fname_in|.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
135 The arguments to the ":hardcopy" command are in |v:cmdarg|.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
136 The expression must take care of deleting the file after printing it.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
137 When there is an error, the expression must return a non-zero number.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
138 If there is no error, return zero or an empty string.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
139 The default for non MS-Windows or VMS systems is to simply use "lpr" to print
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
140 the file: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
141
27903
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
142 system('lpr' .. (&printdevice == '' ? '' : ' -P' .. &printdevice)
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
143 .. ' ' .. v:fname_in) .. delete(v:fname_in) + v:shell_error
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
144
18912
ccd16426a1f9 patch 8.2.0017: OS/2 and MS-DOS are still mentioned
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
145 On MS-Windows machines the default is to copy the file to the currently
ccd16426a1f9 patch 8.2.0017: OS/2 and MS-DOS are still mentioned
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
146 specified printdevice: >
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
147
27903
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
148 system('copy' .. ' ' .. v:fname_in .. (&printdevice == ''
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
149 ? ' LPT1:' : (' \"' .. &printdevice .. '\"')))
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
150 .. delete(v:fname_in)
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
151
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
152 On VMS machines the default is to send the file to either the default or
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
153 currently specified printdevice: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
154
27903
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
155 system('print' .. (&printdevice == '' ? '' : ' /queue=' ..
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
156 &printdevice) .. ' ' .. v:fname_in) .. delete(v:fname_in)
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
157
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
158 If you change this option, using a function is an easy way to avoid having to
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
159 escape all the spaces. Example: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
160
30598
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
161 :set printexpr=PrintFile()
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
162 :function PrintFile()
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
163 : call system("ghostview " .. v:fname_in)
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
164 : call delete(v:fname_in)
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
165 : return v:shell_error
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
166 :endfunc
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
167
30598
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
168 It is more efficient if the option is set to just a function call,
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
169 see |expr-option-function|.
37aa9fd2ed72 patch 9.0.0634: evaluating "expr" options has more overhead than needed
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
170
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
171 Be aware that some print programs return control before they have read the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
172 file. If you delete the file too soon it will not be printed. These programs
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
173 usually offer an option to have them remove the file when printing is done.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
174 *E365*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
175 If evaluating the expression fails or it results in a non-zero number, you get
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
176 an error message. In that case Vim will delete the file. In the default
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
177 value for non-MS-Windows a trick is used: Adding "v:shell_error" will result
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
178 in a non-zero number when the system() call fails.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
179
26743
c2c40cefc17b patch 8.2.3900: it is not easy to use a script-local function for an option
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
180 If the expression starts with s: or |<SID>|, then it is replaced with the
c2c40cefc17b patch 8.2.3900: it is not easy to use a script-local function for an option
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
181 script ID (|local-function|). Example: >
c2c40cefc17b patch 8.2.3900: it is not easy to use a script-local function for an option
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
182 set printexpr=s:MyPrintFile()
c2c40cefc17b patch 8.2.3900: it is not easy to use a script-local function for an option
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
183 set printexpr=<SID>SomePrintFile()
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26743
diff changeset
184 Otherwise, the expression is evaluated in the context of the script where the
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26743
diff changeset
185 option was set, thus script-local items are available.
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26743
diff changeset
186
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
187 This option cannot be set from a |modeline| or in the |sandbox|, for security
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
188 reasons.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
189
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
190 *pfn-option* *E613*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
191 'printfont' 'pfn' string (default "courier")
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
192 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
193 This is the name of the font that will be used for the |:hardcopy| command's
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
194 output. It has the same format as the 'guifont' option, except that only one
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
195 font may be named, and the special "guifont=*" syntax is not available.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
196
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
197 In the Win32 GUI version this specifies a font name with its extra attributes,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
198 as with the 'guifont' option.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
199
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
200 For other systems, only ":h11" is recognized, where "11" is the point size of
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
201 the font. When omitted, the point size is 10.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
202
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
203 *pheader-option*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
204 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
205 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
206 This defines the format of the header produced in |:hardcopy| output. The
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
207 option is defined in the same way as the 'statusline' option. If Vim has not
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
208 been compiled with the |+statusline| feature, this option has no effect and a
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
209 simple default header is used, which shows the page number. The same simple
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
210 header is used when this option is empty.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
211
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
212 *pmbcs-option*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
213 'printmbcharset' 'pmbcs' string (default "")
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
214 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
215 Sets the CJK character set to be used when generating CJK output from
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
216 |:hardcopy|. The following predefined values are currently recognised by Vim:
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
217
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
218 Value Description ~
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
219 Chinese GB_2312-80
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
220 (Simplified) GBT_12345-90
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
221 MAC Apple Mac Simplified Chinese
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
222 GBT-90_MAC GB/T 12345-90 Apple Mac Simplified
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
223 Chinese
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
224 GBK GBK (GB 13000.1-93)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
225 ISO10646 ISO 10646-1:1993
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
226
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
227 Chinese CNS_1993 CNS 11643-1993, Planes 1 & 2
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
228 (Traditional) BIG5
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
229 ETEN Big5 with ETen extensions
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
230 ISO10646 ISO 10646-1:1993
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
231
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
232 Japanese JIS_C_1978
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
233 JIS_X_1983
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
234 JIS_X_1990
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
235 MSWINDOWS Win3.1/95J (JIS X 1997 + NEC +
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
236 IBM extensions)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
237 KANJITALK6 Apple Mac KanjiTalk V6.x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
238 KANJITALK7 Apple Mac KanjiTalk V7.x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
239
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
240 Korean KS_X_1992
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
241 MAC Apple Macintosh Korean
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
242 MSWINDOWS KS X 1992 with MS extensions
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
243 ISO10646 ISO 10646-1:1993
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
244
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
245 Only certain combinations of the above values and 'printencoding' are
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
246 possible. The following tables show the valid combinations:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
247
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
248 euc-cn gbk ucs-2 utf-8 ~
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
249 Chinese GB_2312-80 x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
250 (Simplified) GBT_12345-90 x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
251 MAC x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
252 GBT-90_MAC x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
253 GBK x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
254 ISO10646 x x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
255
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
256 euc-tw big5 ucs-2 utf-8 ~
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
257 Chinese CNS_1993 x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
258 (Traditional) BIG5 x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
259 ETEN x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
260 ISO10646 x x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
261
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
262 euc-jp sjis ucs-2 utf-8 ~
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
263 Japanese JIS_C_1978 x x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
264 JIS_X_1983 x x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
265 JIS_X_1990 x x x
16380
5ad204d8a2f2 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 15878
diff changeset
266 MSWINDOWS x
5ad204d8a2f2 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 15878
diff changeset
267 KANJITALK6 x
5ad204d8a2f2 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 15878
diff changeset
268 KANJITALK7 x
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
269
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
270 euc-kr cp949 ucs-2 utf-8 ~
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
271 Korean KS_X_1992 x
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
272 MAC x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
273 MSWINDOWS x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
274 ISO10646 x x
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
275
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
276 To set up the correct encoding and character set for printing some
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
277 Japanese text you would do the following; >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
278 :set printencoding=euc-jp
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
279 :set printmbcharset=JIS_X_1983
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
280
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
281 If 'printmbcharset' is not one of the above values then it is assumed to
21991
bbca88cd13d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
282 specify a custom multibyte character set and no check will be made that it is
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
283 compatible with the value for 'printencoding'. Vim will look for a file
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
284 defining the character set in the "print" directory in 'runtimepath'.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
285
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
286 *pmbfn-option*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
287 'printmbfont' 'pmbfn' string (default "")
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
288 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
289 This is a comma-separated list of fields for font names to be used when
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
290 generating CJK output from |:hardcopy|. Each font name has to be preceded
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
291 with a letter indicating the style the font is to be used for as follows:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
292
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
293 r:{font-name} font to use for normal characters
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
294 b:{font-name} font to use for bold characters
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
295 i:{font-name} font to use for italic characters
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
296 o:{font-name} font to use for bold-italic characters
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
297
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
298 A field with the r: prefix must be specified when doing CJK printing. The
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
299 other fontname specifiers are optional. If a specifier is missing then
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
300 another font will be used as follows:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
301
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
302 if b: is missing, then use r:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
303 if i: is missing, then use r:
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 834
diff changeset
304 if o: is missing, then use b:
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
305
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
306 Some CJK fonts do not contain characters for codes in the ASCII code range.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
307 Also, some characters in the CJK ASCII code ranges differ in a few code points
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
308 from traditional ASCII characters. There are two additional fields to control
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
309 printing of characters in the ASCII code range.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
310
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
311 c:yes Use Courier font for characters in the ASCII
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
312 c:no (default) code range.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
313
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
314 a:yes Use ASCII character set for codes in the ASCII
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
315 a:no (default) code range.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
316
21991
bbca88cd13d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
317 The following is an example of specifying two multibyte fonts, one for normal
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
318 and italic printing and one for bold and bold-italic printing, and using
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
319 Courier to print codes in the ASCII code range but using the national
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
320 character set: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
321 :set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,c:yes
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
322 <
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
323 *popt-option*
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
324 'printoptions' 'popt' string (default "")
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
325 global
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
326 This is a comma-separated list of items that control the format of the output
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
327 of |:hardcopy|:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
328
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
329 left:{spec} left margin (default: 10pc)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
330 right:{spec} right margin (default: 5pc)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
331 top:{spec} top margin (default: 5pc)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
332 bottom:{spec} bottom margin (default: 5pc)
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
333 {spec} is a number followed by "in" for inches, "pt"
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
334 for points (1 point is 1/72 of an inch), "mm" for
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
335 millimeters or "pc" for a percentage of the media
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
336 size.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
337 Weird example:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
338 left:2in,top:30pt,right:16mm,bottom:3pc
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
339 If the unit is not recognized there is no error and
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
340 the default value is used.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
341
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
342 header:{nr} Number of lines to reserve for the header.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
343 Only the first line is actually filled, thus when {nr}
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
344 is 2 there is one empty line. The header is formatted
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
345 according to 'printheader'.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
346 header:0 Do not print a header.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
347 header:2 (default) Use two lines for the header
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
348
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
349 syntax:n Do not use syntax highlighting. This is faster and
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
350 thus useful when printing large files.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
351 syntax:y Do syntax highlighting.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
352 syntax:a (default) Use syntax highlighting if the printer appears to be
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
353 able to print color or grey.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
354
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
355 number:y Include line numbers in the printed output.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
356 number:n (default) No line numbers.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
357
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
358 wrap:y (default) Wrap long lines.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
359 wrap:n Truncate long lines.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
360
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
361 duplex:off Print on one side.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
362 duplex:long (default) Print on both sides (when possible), bind on long
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
363 side.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
364 duplex:short Print on both sides (when possible), bind on short
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
365 side.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
366
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
367 collate:y (default) Collating: 1 2 3, 1 2 3, 1 2 3
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
368 collate:n No collating: 1 1 1, 2 2 2, 3 3 3
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
369
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
370 jobsplit:n (default) Do all copies in one print job
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
371 jobsplit:y Do each copy as a separate print job. Useful when
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
372 doing N-up postprocessing.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
373
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
374 portrait:y (default) Orientation is portrait.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
375 portrait:n Orientation is landscape.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
376 *a4* *letter*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
377 paper:A4 (default) Paper size: A4
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
378 paper:{name} Paper size from this table:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
379 {name} size in cm size in inch ~
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
380 10x14 25.4 x 35.57 10 x 14
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
381 A3 29.7 x 42 11.69 x 16.54
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
382 A4 21 x 29.7 8.27 x 11.69
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
383 A5 14.8 x 21 5.83 x 8.27
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
384 B4 25 x 35.3 10.12 x 14.33
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
385 B5 17.6 x 25 7.17 x 10.12
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
386 executive 18.42 x 26.67 7.25 x 10.5
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
387 folio 21 x 33 8.27 x 13
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
388 ledger 43.13 x 27.96 17 x 11
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
389 legal 21.59 x 35.57 8.5 x 14
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
390 letter 21.59 x 27.96 8.5 x 11
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
391 quarto 21.59 x 27.5 8.5 x 10.83
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
392 statement 13.97 x 21.59 5.5 x 8.5
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
393 tabloid 27.96 x 43.13 11 x 17
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
394
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
395 formfeed:n (default) Treat form feed characters (0x0c) as a normal print
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
396 character.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
397 formfeed:y When a form feed character is encountered, continue
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
398 printing of the current line at the beginning of the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
399 first line on a new page.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
400
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
401 The item indicated with (default) is used when the item is not present. The
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
402 values are not always used, especially when using a dialog to select the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
403 printer and options.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
404 Example: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
405 :set printoptions=paper:letter,duplex:off
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
406
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
407 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
408 3. PostScript Printing *postscript-printing*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
409 *E455* *E456* *E457* *E624*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
410 Provided you have enough disk space there should be no problems generating a
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
411 PostScript file. You need to have the runtime files correctly installed (if
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
412 you can find the help files, they probably are).
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
413
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
414 There are currently a number of limitations with PostScript printing:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
415
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
416 - 'printfont' - The font name is ignored (the Courier family is always used -
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
417 it should be available on all PostScript printers) but the font size is
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
418 used.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
419
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
420 - 'printoptions' - The duplex setting is used when generating PostScript
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
421 output, but it is up to the printer to take notice of the setting. If the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
422 printer does not support duplex printing then it should be silently ignored.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
423 Some printers, however, don't print at all.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
424
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
425 - 8-bit support - While a number of 8-bit print character encodings are
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
426 supported it is possible that some characters will not print. Whether a
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
427 character will print depends on the font in the printer knowing the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
428 character. Missing characters will be replaced with an upside down question
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
429 mark, or a space if that character is also not known by the font. It may be
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
430 possible to get all the characters in an encoding to print by installing a
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
431 new version of the Courier font family.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
432
21991
bbca88cd13d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
433 - Multi-byte support - Currently Vim will try to convert multibyte characters
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
434 to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
435 empty). Any characters that are not successfully converted are shown as
21991
bbca88cd13d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
436 unknown characters. Printing will fail if Vim cannot convert the multibyte
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
437 to the 8-bit encoding.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
438
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
439 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
440 4. Custom 8-bit Print Character Encodings *postscript-print-encoding*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
441 *E618* *E619*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
442 To use your own print character encoding when printing 8-bit character data
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
443 you need to define your own PostScript font encoding vector. Details on how
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
444 to define a font encoding vector is beyond the scope of this help file, but
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
445 you can find details in the PostScript Language Reference Manual, 3rd Edition,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
446 published by Addison-Wesley and available in PDF form at
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
447 http://www.adobe.com/. The following describes what you need to do for Vim to
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
448 locate and use your print character encoding.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
449
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
450 i. Decide on a unique name for your encoding vector, one that does not clash
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
451 with any of the recognized or standard encoding names that Vim uses (see
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
452 |encoding-names| for a list), and that no one else is likely to use.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
453 ii. Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
454 'runtimepath' and rename it with your unique name.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
455 iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
456 with your unique name (don't forget the line starting %%Title:), and
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
457 modify the array of glyph names to define your new encoding vector. The
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
458 array must have exactly 256 entries or you will not be able to print!
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
459 iv. Within Vim, set 'printencoding' to your unique encoding name and then
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
460 print your file. Vim will now use your custom print character encoding.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
461
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
462 Vim will report an error with the resource file if you change the order or
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
463 content of the first 3 lines, other than the name of the encoding on the line
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
464 starting %%Title: or the version number on the line starting %%Version:.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
465
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
466 [Technical explanation for those that know PostScript - Vim looks for a file
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
467 with the same name as the encoding it will use when printing. The file
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
468 defines a new PostScript Encoding resource called /VIM-name, where name is the
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
469 print character encoding Vim will use.]
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
470
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
471 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
472 5. PostScript CJK Printing *postscript-cjk-printing*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
473 *E673* *E674* *E675*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
474
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
475 Vim supports printing of Chinese, Japanese, and Korean files. Setting up Vim
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
476 to correctly print CJK files requires setting up a few more options.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
477
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
478 Each of these countries has many standard character sets and encodings which
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
479 require that both be specified when printing. In addition, CJK fonts normally
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
480 do not have the concept of italic glyphs and use different weight or stroke
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
481 style to achieve emphasis when printing. This in turn requires a different
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
482 approach to specifying fonts to use when printing.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
483
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
484 The encoding and character set are specified with the 'printencoding' and
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
485 'printmbcharset' options. If 'printencoding' is not specified then 'encoding'
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
486 is used as normal. If 'printencoding' is specified then characters will be
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
487 translated to this encoding for printing. You should ensure that the encoding
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
488 is compatible with the character set needed for the file contents or some
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
489 characters may not appear when printed.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
490
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
491 The fonts to use for CJK printing are specified with 'printmbfont'. This
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
492 option allows you to specify different fonts to use when printing characters
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
493 which are syntax highlighted with the font styles normal, italic, bold and
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
494 bold-italic.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
495
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
496 No CJK fonts are supplied with Vim. There are some free Korean, Japanese, and
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
497 Traditional Chinese fonts available at:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
498
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
499 http://examples.oreilly.com/cjkvinfo/adobe/samples/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
500
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
501 You can find descriptions of the various fonts in the read me file at
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
502
2236
dc2e5ec0500d Added the undofile() function. Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
503 http://examples.oreilly.de/english_examples/cjkvinfo/adobe/00README
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
504
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
505 Please read your printer documentation on how to install new fonts.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
506
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
507 CJK fonts can be large containing several thousand glyphs, and it is not
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
508 uncommon to find that they only contain a subset of a national standard. It
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
509 is not unusual to find the fonts to not include characters for codes in the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
510 ASCII code range. If you find half-width Roman characters are not appearing
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
511 in your printout then you should configure Vim to use the Courier font the
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
512 half-width ASCII characters with 'printmbfont'. If your font does not include
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
513 other characters then you will need to find another font that does.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
514
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
515 Another issue with ASCII characters, is that the various national character
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
516 sets specify a couple of different glyphs in the ASCII code range. If you
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
517 print ASCII text using the national character set you may see some unexpected
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
518 characters. If you want true ASCII code printing then you need to configure
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
519 Vim to output ASCII characters for the ASCII code range with 'printmbfont'.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
520
21991
bbca88cd13d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
521 It is possible to define your own multibyte character set although this
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
522 should not be attempted lightly. A discussion on the process if beyond the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
523 scope of these help files. You can find details on CMap (character map) files
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
524 in the document 'Adobe CMap and CIDFont Files Specification, Version 1.0',
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
525 available from http://www.adobe.com as a PDF file.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
526
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
527 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
528 6. PostScript Printing Troubleshooting *postscript-print-trouble*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
529 *E621*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
530 Usually the only sign of a problem when printing with PostScript is that your
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
531 printout does not appear. If you are lucky you may get a printed page that
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
532 tells you the PostScript operator that generated the error that prevented the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
533 print job completing.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
534
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
535 There are a number of possible causes as to why the printing may have failed:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
536
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
537 - Wrong version of the prolog resource file. The prolog resource file
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
538 contains some PostScript that Vim needs to be able to print. Each version
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
539 of Vim needs one particular version. Make sure you have correctly installed
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
540 the runtime files, and don't have any old versions of a file called prolog
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
541 in the print directory in your 'runtimepath' directory.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
542
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
543 - Paper size. Some PostScript printers will abort printing a file if they do
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
544 not support the requested paper size. By default Vim uses A4 paper. Find
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
545 out what size paper your printer normally uses and set the appropriate paper
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
546 size with 'printoptions'. If you cannot find the name of the paper used,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
547 measure a sheet and compare it with the table of supported paper sizes listed
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
548 for 'printoptions', using the paper that is closest in both width AND height.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
549 Note: The dimensions of actual paper may vary slightly from the ones listed.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
550 If there is no paper listed close enough, then you may want to try psresize
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
551 from PSUtils, discussed below.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
552
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
553 - Two-sided printing (duplex). Normally a PostScript printer that does not
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
554 support two-sided printing will ignore any request to do it. However, some
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
555 printers may abort the job altogether. Try printing with duplex turned off.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
556 Note: Duplex prints can be achieved manually using PS utils - see below.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
557
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
558 - Collated printing. As with Duplex printing, most PostScript printers that
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
559 do not support collating printouts will ignore a request to do so. Some may
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
560 not. Try printing with collation turned off.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
561
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
562 - Syntax highlighting. Some print management code may prevent the generated
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
563 PostScript file from being printed on a black and white printer when syntax
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
564 highlighting is turned on, even if solid black is the only color used. Try
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
565 printing with syntax highlighting turned off.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
566
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
567 A safe printoptions setting to try is: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
568
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
569 :set printoptions=paper:A4,duplex:off,collate:n,syntax:n
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
570
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
571 Replace "A4" with the paper size that best matches your printer paper.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
572
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
573 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
574 7. PostScript Utilities *postscript-print-util*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
575
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
576 7.1 Ghostscript
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
577
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
578 Ghostscript is a PostScript and PDF interpreter that can be used to display
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
579 and print on non-PostScript printers PostScript and PDF files. It can also
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
580 generate PDF files from PostScript.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
581
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
582 Ghostscript will run on a wide variety of platforms.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
583
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
584 There are three available versions:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
585
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
586 - AFPL Ghostscript (formerly Aladdin Ghostscript) which is free for
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
587 non-commercial use. It can be obtained from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
588
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
589 http://www.cs.wisc.edu/~ghost/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
590
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
591 - GNU Ghostscript which is available under the GNU General Public License. It
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
592 can be obtained from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
593
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
594 ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
595
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
596 - A commercial version for inclusion in commercial products.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
597
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
598 Additional information on Ghostscript can also be found at:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
599
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
600 http://www.ghostscript.com/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
601
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
602 Support for a number of non PostScript printers is provided in the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
603 distribution as standard, but if you cannot find support for your printer
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
604 check the Ghostscript site for other printers not included by default.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
605
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
606
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
607 7.2 Ghostscript Previewers.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
608
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
609 The interface to Ghostscript is very primitive so a number of graphical front
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
610 ends have been created. These allow easier PostScript file selection,
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
611 previewing at different zoom levels, and printing. Check supplied
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
612 documentation for full details.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
613
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
614 X11
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
615
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
616 - Ghostview. Obtainable from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
617
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
618 http://www.cs.wisc.edu/~ghost/gv/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
619
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
620 - gv. Derived from Ghostview. Obtainable from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
621
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
622 http://wwwthep.physik.uni-mainz.de/~plass/gv/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
623
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
624 Copies (possibly not the most recent) can be found at:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
625
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
626 http://www.cs.wisc.edu/~ghost/gv/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
627
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
628 OpenVMS
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
629
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
630 - Is apparently supported in the main code now (untested). See:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
631
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
632 http://wwwthep.physik.uni-mainz.de/~plass/gv/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
633
18912
ccd16426a1f9 patch 8.2.0017: OS/2 and MS-DOS are still mentioned
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
634 MS-Windows
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
635
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
636 - GSview. Obtainable from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
637
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
638 http://www.cs.wisc.edu/~ghost/gsview/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
639
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
640 Linux
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
641
19116
9b7f90e56753 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18912
diff changeset
642 - GSview. Linux version of the popular MS-Windows previewer.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
643 Obtainable from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
644
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
645 http://www.cs.wisc.edu/~ghost/gsview/
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
646
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
647 - BMV. Different from Ghostview and gv in that it doesn't use X but svgalib.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
648 Obtainable from:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
649
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
650 ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
651
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
652
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
653 7.3 PSUtils
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
654
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
655 PSUtils is a collection of utility programs for manipulating PostScript
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
656 documents. Binary distributions are available for many platforms, as well as
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
657 the full source. PSUtils can be found at:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
658
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
659 http://knackered.org/angus/psutils
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
660
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
661 The utilities of interest include:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
662
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
663 - psnup. Convert PS files for N-up printing.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
664 - psselect. Select page range and order of printing.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
665 - psresize. Change the page size.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
666 - psbook. Reorder and lay out pages ready for making a book.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
667
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
668 The output of one program can be used as the input to the next, allowing for
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
669 complex print document creation.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
670
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
671
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
672 N-UP PRINTING
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
673
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
674 The psnup utility takes an existing PostScript file generated from Vim and
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
675 convert it to an n-up version. The simplest way to create a 2-up printout is
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
676 to first create a PostScript file with: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
677
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
678 :hardcopy > test.ps
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
679
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
680 Then on your command line execute: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
681
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
682 psnup -n 2 test.ps final.ps
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
683
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
684 Note: You may get warnings from some Ghostscript previewers for files produced
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
685 by psnup - these may safely be ignored.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
686
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
687 Finally print the file final.ps to your PostScript printer with your
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
688 platform's print command. (You will need to delete the two PostScript files
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
689 afterwards yourself.) 'printexpr' could be modified to perform this extra
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
690 step before printing.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
691
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
692
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
693 ALTERNATE DUPLEX PRINTING
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
694
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
695 It is possible to achieve a poor man's version of duplex printing using the PS
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
696 utility psselect. This utility has options -e and -o for printing just the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
697 even or odd pages of a PS file respectively.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
698
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
699 First generate a PS file with the 'hardcopy' command, then generate new
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
700 files with all the odd and even numbered pages with: >
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
701
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
702 psselect -o test.ps odd.ps
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
703 psselect -e test.ps even.ps
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
704
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
705 Next print odd.ps with your platform's normal print command. Then take the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
706 print output, turn it over and place it back in the paper feeder. Now print
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
707 even.ps with your platform's print command. All the even pages should now
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
708 appear on the back of the odd pages.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
709
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
710 There are a couple of points to bear in mind:
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
711
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
712 1. Position of the first page. If the first page is on top of the printout
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
713 when printing the odd pages then you need to reverse the order that the odd
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
714 pages are printed. This can be done with the -r option to psselect. This
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
715 will ensure page 2 is printed on the back of page 1.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
716 Note: it is better to reverse the odd numbered pages rather than the even
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
717 numbered in case there are an odd number of pages in the original PS file.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
718
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
719 2. Paper flipping. When turning over the paper with the odd pages printed on
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
720 them you may have to either flip them horizontally (along the long edge) or
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
721 vertically (along the short edge), as well as possibly rotating them 180
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
722 degrees. All this depends on the printer - it will be more obvious for
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
723 desktop ink jets than for small office laser printers where the paper path
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
724 is hidden from view.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
725
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
726
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
727 ==============================================================================
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
728 8. Formfeed Characters *printing-formfeed*
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
729
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 21991
diff changeset
730 By default Vim does not do any special processing of formfeed control
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
731 characters. Setting the 'printoptions' formfeed item will make Vim recognize
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
732 formfeed characters and continue printing the current line at the beginning
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
733 of the first line on a new page. The use of formfeed characters provides
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
734 rudimentary print control but there are certain things to be aware of.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
735
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
736 Vim will always start printing a line (including a line number if enabled)
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
737 containing a formfeed character, even if it is the first character on the
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
738 line. This means if a line starting with a formfeed character is the first
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
739 line of a page then Vim will print a blank page.
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
740
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
741 Since the line number is printed at the start of printing the line containing
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
742 the formfeed character, the remainder of the line printed on the new page
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
743 will not have a line number printed for it (in the same way as the wrapped
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
744 lines of a long line when wrap in 'printoptions' is enabled).
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
745
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
746 If the formfeed character is the last character on a line, then printing will
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
747 continue on the second line of the new page, not the first. This is due to
11473
bd6ff5246c71 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
748 Vim processing the end of the line after the formfeed character and moving
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
749 down a line to continue printing.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
750
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
751 Due to the points made above it is recommended that when formfeed character
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
752 processing is enabled, printing of line numbers is disabled, and that form
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
753 feed characters are not the last character on a line. Even then you may need
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
754 to adjust the number of lines before a formfeed character to prevent
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
755 accidental blank pages.
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
756
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
757 ==============================================================================
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
758 vim:tw=78:ts=8:noet:ft=help:norl: