This file is indexed.

/usr/share/doc/vim/html/print.html is in vim-doc 2:8.0.1453-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-type" content="text/html; charset=ISO-8859-1">
<TITLE>Vim documentation: print</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Vim documentation: print</H1>
<A NAME="top"></A>
<A HREF="index.html">main help file</A>

<HR>
<PRE>

*<A NAME="print.txt"></A><B>print.txt</B>*     For Vim version 8.0.  Last change: 2010 Jul 20


		  VIM REFERENCE MANUAL    by <A HREF="intro.html#Bram">Bram</A> <A HREF="intro.html#Moolenaar">Moolenaar</A>



Printing						*<A NAME="printing"></A><B>printing</B>*

1. Introduction				|<A HREF="#print-intro">print-intro</A>|
2. Print options			|<A HREF="#print-options">print-options</A>|
3. PostScript Printing			|<A HREF="#postscript-printing">postscript-printing</A>|
4. PostScript Printing Encoding		|<A HREF="#postscript-print-encoding">postscript-print-encoding</A>|
5. PostScript CJK Printing		|<A HREF="#postscript-cjk-printing">postscript-cjk-printing</A>|
6. PostScript Printing Troubleshooting	|<A HREF="#postscript-print-trouble">postscript-print-trouble</A>|
7. PostScript Utilities			|<A HREF="#postscript-print-util">postscript-print-util</A>|
8. Formfeed Characters			|<A HREF="#printing-formfeed">printing-formfeed</A>|

{Vi has None of this}
{only available when compiled with the |<A HREF="various.html#+printer">+printer</A>| feature}

==============================================================================

1. Introduction						*<A NAME="print-intro"></A><B>print-intro</B>*

On <A HREF="os_win32.html#MS-Windows">MS-Windows</A> Vim can print your text on any installed printer.  On other
systems a PostScript file is produced.  This can be directly sent to a
PostScript printer.  For other printers a program like ghostscript needs to be
used.

Note: If you have problems <A HREF="#printing">printing</A> with |<A HREF="#:hardcopy">:hardcopy</A>|, an alternative is to use
|<A HREF="syntax.html#:TOhtml">:TOhtml</A>| and print the resulting html file from a browser.


					*<A NAME=":ha"></A><B>:ha</B>* *<A NAME=":hardcopy"></A><B>:hardcopy</B>* *<A NAME="E237"></A><B>E237</B>* *<A NAME="E238"></A><B>E238</B>* *<A NAME="E324"></A><B>E324</B>*
:[range]ha[rdcopy][!] [arguments]
			Send <A HREF="cmdline.html#[range]">[range]</A> lines (default whole file) to the
			printer.

			On <A HREF="os_win32.html#MS-Windows">MS-Windows</A> a <A HREF="gui_w32.html#dialog">dialog</A> is displayed to allow selection
			of printer, paper size etc.  To skip the <A HREF="gui_w32.html#dialog">dialog</A>, use
			the [!].  In this <A HREF="change.html#case">case</A> the printer defined by
			<A HREF="options.html#'printdevice'">'printdevice'</A> is used, or, if <A HREF="options.html#'printdevice'">'printdevice'</A> is empty,
			the system default printer.

			For systems other than <A HREF="os_win32.html#MS-Windows">MS-Windows</A>, PostScript is
			written in a temp file and <A HREF="options.html#'printexpr'">'printexpr'</A> is used to
			actually print <A HREF="motion.html#it">it</A>.  Then [arguments] can be used by
			<A HREF="options.html#'printexpr'">'printexpr'</A> through |<A HREF="eval.html#v:cmdarg">v:cmdarg</A>|.  Otherwise [arguments]
			is ignored.  <A HREF="options.html#'printoptions'">'printoptions'</A> can be used to specify
			paper size, duplex, etc.

:[range]ha[rdcopy][!] &gt;{filename}
			As above, but write the resulting PostScript in file
			{filename}.
			Things like &quot;<A HREF="motion.html#&#37;">&#37;</A>&quot; are expanded |<A HREF="cmdline.html#cmdline-special">cmdline-special</A>|
			Careful: An existing file is silently overwritten.
			{only available when compiled with the |<A HREF="various.html#+postscript">+postscript</A>|
			feature}
			On <A HREF="os_win32.html#MS-Windows">MS-Windows</A> use the &quot;print to file&quot; feature of the
			printer driver.

Progress is displayed during <A HREF="#printing">printing</A> <A HREF="motion.html#as">as</A> a page number and a percentage.  To
abort <A HREF="#printing">printing</A> use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).

Printer output is controlled by the <A HREF="options.html#'printfont'">'printfont'</A> and <A HREF="options.html#'printoptions'">'printoptions'</A> <A HREF="options.html#options">options</A>.
<A HREF="options.html#'printheader'">'printheader'</A> specifies the format of a page header.

The printed file is always limited to the selected margins, irrespective of
the current window's <A HREF="options.html#'wrap'">'wrap'</A> or <A HREF="options.html#'linebreak'">'linebreak'</A> settings.  The &quot;wrap&quot; item in
<A HREF="options.html#'printoptions'">'printoptions'</A> can be used to switch wrapping off.
The current highlighting colors are used in the printout, with the following
considerations:
1) The normal background is always rendered <A HREF="motion.html#as">as</A> white (i.e. blank paper).
2) White text or the default foreground is rendered <A HREF="motion.html#as">as</A> black, so that <A HREF="motion.html#it">it</A> shows
   up!
3) If <A HREF="options.html#'background'">'background'</A> is &quot;dark&quot;, then the colours are darkened to compensate for
   the fact that otherwise they would be too bright to show up clearly on
   white paper.

==============================================================================

2. Print <A HREF="options.html#options">options</A>					*<A NAME="print-options"></A><B>print-options</B>*

Here are the details for the <A HREF="options.html#options">options</A> that change the way <A HREF="#printing">printing</A> is done.
For generic info about setting options see |<A HREF="options.html">options.txt</A>|.


							*<A NAME="pdev-option"></A><B>pdev-option</B>*
<A HREF="options.html#'printdevice'">'printdevice'</A> <A HREF="options.html#'pdev'">'pdev'</A>	<A HREF="eval.html#string">string</A>	(default empty)
			global
This defines the name of the printer to be used when the |<A HREF="#:hardcopy">:hardcopy</A>| command
is issued with a bang (!) to skip the printer selection <A HREF="gui_w32.html#dialog">dialog</A>.  On <A HREF="os_win32.html#Win32">Win32</A>, <A HREF="motion.html#it">it</A>
should be the printer name exactly <A HREF="motion.html#as">as</A> <A HREF="motion.html#it">it</A> appears in the standard printer
<A HREF="gui_w32.html#dialog">dialog</A>.
If the option is empty, then vim will use the system default printer for
&quot;:hardcopy!&quot;


							*<A NAME="penc-option"></A><B>penc-option</B>* *<A NAME="E620"></A><B>E620</B>*
<A HREF="options.html#'printencoding'">'printencoding'</A> <A HREF="options.html#'penc'">'penc'</A>	<A HREF="eval.html#String">String</A>	(default empty, except for:
					Windows, <A HREF="os_os2.html#OS/2">OS/2</A>: cp1252,
					<A HREF="os_mac.html#Macintosh">Macintosh</A>: mac-roman,
					<A HREF="os_vms.html#VMS">VMS</A>: dec-mcs,
					HPUX: hp-roman8,
					EBCDIC: ebcdic-uk)
			global
Sets the character encoding used when <A HREF="#printing">printing</A>.  This option tells Vim which
print character encoding file from the &quot;print&quot; directory in <A HREF="options.html#'runtimepath'">'runtimepath'</A> to
use.

This option will accept any value from |<A HREF="mbyte.html#encoding-names">encoding-names</A>|.  Any recognized names
are converted to Vim standard names - see <A HREF="options.html#'encoding'">'encoding'</A> for more details.  Names
not recognized by Vim will just be converted to lower <A HREF="change.html#case">case</A> and underscores
replaced with '<A HREF="motion.html#-">-</A>' <A HREF="sign.html#signs">signs</A>.

If <A HREF="options.html#'printencoding'">'printencoding'</A> is empty or Vim cannot find the file then <A HREF="motion.html#it">it</A> will use
<A HREF="options.html#'encoding'">'encoding'</A> (if Vim is compiled with |<A HREF="various.html#+multi_byte">+multi_byte</A>| and <A HREF="motion.html#it">it</A> is set an 8-bit
encoding) to find the print character encoding file.  If Vim is unable to find
a character encoding file then <A HREF="motion.html#it">it</A> will use the &quot;latin1&quot; print character
encoding file.

When <A HREF="options.html#'encoding'">'encoding'</A> is set to a <A HREF="mbyte.html#multi-byte">multi-byte</A> encoding, Vim will try to convert
characters to the <A HREF="#printing">printing</A> encoding for <A HREF="#printing">printing</A> (if <A HREF="options.html#'printencoding'">'printencoding'</A> is empty
then the conversion will be to latin1).  Conversion to a <A HREF="#printing">printing</A> encoding
other than latin1 will require Vim to be compiled with the |<A HREF="various.html#+iconv">+iconv</A>| feature.
If no conversion is possible then <A HREF="#printing">printing</A> will fail.  Any characters that
cannot be converted will be replaced with upside down question marks.

Four print character encoding files are provided to support default <A HREF="os_mac.html#Mac">Mac</A>, <A HREF="os_vms.html#VMS">VMS</A>,
HPUX, and EBCDIC character encodings and are used by default on these
platforms.  Code page 1252 print character encoding is used by default on
Windows and <A HREF="os_os2.html#OS/2">OS/2</A> platforms.


							*<A NAME="pexpr-option"></A><B>pexpr-option</B>*
<A HREF="options.html#'printexpr'">'printexpr'</A> <A HREF="options.html#'pexpr'">'pexpr'</A>	<A HREF="eval.html#String">String</A>	(default: see below)
			global
Expression that is evaluated to print the PostScript produced with
|<A HREF="#:hardcopy">:hardcopy</A>|.
The file name to be printed is in |<A HREF="eval.html#v:fname_in">v:fname_in</A>|.
The arguments to the &quot;<A HREF="#:hardcopy">:hardcopy</A>&quot; command are in |<A HREF="eval.html#v:cmdarg">v:cmdarg</A>|.
The <A HREF="eval.html#expression">expression</A> must take care of <A HREF="change.html#deleting">deleting</A> the file after <A HREF="#printing">printing</A> <A HREF="motion.html#it">it</A>.
When there is an error, the <A HREF="eval.html#expression">expression</A> must return a non-zero number.
If there is no error, return zero or an empty <A HREF="eval.html#string">string</A>.
The default for non <A HREF="os_win32.html#MS-Windows">MS-Windows</A> or <A HREF="os_vms.html#VMS">VMS</A> systems is to simply use &quot;lpr&quot; to print
the file:

<B>    system('lpr' . (&amp;printdevice == '' ? '' : ' -P' . &amp;printdevice)</B>
<B>	. ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error</B>

On MS-Dos, <A HREF="os_win32.html#MS-Windows">MS-Windows</A> and <A HREF="os_os2.html#OS/2">OS/2</A> machines the default is to copy the file to the
currently specified printdevice:

<B>    system('copy' . ' ' . v:fname_in . (&amp;printdevice == ''</B>
<B>		? ' LPT1:' : (' \"' . &amp;printdevice . '\"')))</B>
<B>		. delete(v:fname_in)</B>

On <A HREF="os_vms.html#VMS">VMS</A> machines the default is to send the file to either the default or
currently specified printdevice:

<B>    system('print' . (&amp;printdevice == '' ? '' : ' /queue=' .</B>
<B>		&amp;printdevice) . ' ' . v:fname_in) . delete(v:fname_in)</B>

If you change this option, using a function is an <A HREF="starting.html#easy">easy</A> way to avoid having to
<A HREF="intro.html#escape">escape</A> all the spaces.  Example:

<B>	:set printexpr=PrintFile(v:fname_in)</B>
<B>	:function PrintFile(fname)</B>
<B>	:  call system("ghostview " . a:fname)</B>
<B>	:  call delete(a:fname)</B>
<B>	:  return v:shell_error</B>
<B>	:endfunc</B>

Be aware that some print programs return <A HREF="intro.html#control">control</A> before they have read the
file.  If you delete the file too soon <A HREF="motion.html#it">it</A> will not be printed.  These programs
usually offer an option to have them remove the file when <A HREF="#printing">printing</A> is done.

							*<A NAME="E365"></A><B>E365</B>*
If evaluating the <A HREF="eval.html#expression">expression</A> fails or <A HREF="motion.html#it">it</A> results in a non-zero number, you get
an error message.  In that <A HREF="change.html#case">case</A> Vim will delete the file.  In the default
value for non-MS-Windows a trick is used: Adding &quot;<A HREF="eval.html#v:shell_error">v:shell_error</A>&quot; will result
in a non-zero number when the <A HREF="eval.html#system()">system()</A> call fails.

This option cannot be set from a |<A HREF="options.html#modeline">modeline</A>| or in the |<A HREF="eval.html#sandbox">sandbox</A>|, for security
reasons.


							*<A NAME="pfn-option"></A><B>pfn-option</B>* *<A NAME="E613"></A><B>E613</B>*
<A HREF="options.html#'printfont'">'printfont'</A> <A HREF="options.html#'pfn'">'pfn'</A>	<A HREF="eval.html#string">string</A>	(default &quot;courier&quot;)
			global
This is the name of the font that will be used for the |<A HREF="#:hardcopy">:hardcopy</A>| command's
output.  It has the same format <A HREF="motion.html#as">as</A> the <A HREF="options.html#'guifont'">'guifont'</A> option, except that only one
font may be named, and the special &quot;guifont=*&quot; <A HREF="syntax.html#syntax">syntax</A> is not available.

In the <A HREF="os_win32.html#Win32">Win32</A> <A HREF="gui.html#GUI">GUI</A> version this specifies a font name with its extra attributes,
<A HREF="motion.html#as">as</A> with the <A HREF="options.html#'guifont'">'guifont'</A> option.

For other systems, only &quot;:h11&quot; is recognized, where &quot;11&quot; is the point size of
the font.  When omitted, the point size is 10.


							*<A NAME="pheader-option"></A><B>pheader-option</B>*
<A HREF="options.html#'printheader'">'printheader'</A> <A HREF="options.html#'pheader'">'pheader'</A>  <A HREF="eval.html#string">string</A>  (default &quot;&#37;&lt;&#37;f&#37;h&#37;m&#37;=Page &#37;N&quot;)
			 global
This defines the format of the header produced in |<A HREF="#:hardcopy">:hardcopy</A>| output.  The
option is defined in the same way <A HREF="motion.html#as">as</A> the <A HREF="options.html#'statusline'">'statusline'</A> option.  If Vim has not
been compiled with the |<A HREF="various.html#+statusline">+statusline</A>| feature, this option has no effect and a
simple default header is used, which shows the page number.  The same simple
header is used when this option is empty.


							*<A NAME="pmbcs-option"></A><B>pmbcs-option</B>*
<A HREF="options.html#'printmbcharset'">'printmbcharset'</A> <A HREF="options.html#'pmbcs'">'pmbcs'</A>  <A HREF="eval.html#string">string</A> (default &quot;&quot;)
			  global
Sets the CJK character set to be used when generating CJK output from
|<A HREF="#:hardcopy">:hardcopy</A>|.  The following predefined values are currently recognised by Vim:

<B><FONT COLOR="PURPLE">		Value		Description </FONT></B>
  <A HREF="mbyte.html#Chinese">Chinese</A>	GB_2312-80
  (Simplified)	GBT_12345-90
		MAC		Apple <A HREF="os_mac.html#Mac">Mac</A> Simplified <A HREF="mbyte.html#Chinese">Chinese</A>
		GBT-90_MAC	GB/T 12345-90 Apple <A HREF="os_mac.html#Mac">Mac</A> Simplified
				  <A HREF="mbyte.html#Chinese">Chinese</A>
		GBK		GBK (GB 13000.1-93)
		ISO10646	ISO 10646-1:1993

  <A HREF="mbyte.html#Chinese">Chinese</A>	CNS_1993	CNS 11643-1993, Planes 1 <A HREF="change.html#&amp;">&amp;</A> 2
  (Traditional)	BIG5
		ETEN		Big5 with ETen extensions
		ISO10646	ISO 10646-1:1993

  <A HREF="mbyte.html#Japanese">Japanese</A>	JIS_C_1978
		JIS_X_1983
		JIS_X_1990
		MSWINDOWS	Win3.1/95J (JIS X 1997 + NEC +
				  IBM extensions)
		KANJITALK6	Apple <A HREF="os_mac.html#Mac">Mac</A> KanjiTalk V6.x
		KANJITALK7	Apple <A HREF="os_mac.html#Mac">Mac</A> KanjiTalk V7.x

  <A HREF="mbyte.html#Korean">Korean</A>	KS_X_1992
		MAC		Apple <A HREF="os_mac.html#Macintosh">Macintosh</A> <A HREF="mbyte.html#Korean">Korean</A>
		MSWINDOWS	KS X 1992 with MS extensions
		ISO10646	ISO 10646-1:1993

Only certain combinations of the above values and <A HREF="options.html#'printencoding'">'printencoding'</A> are
possible.  The following tables show the valid combinations:

<B><FONT COLOR="PURPLE">				euc-cn	 gbk	ucs-2	utf-8 </FONT></B>
  <A HREF="mbyte.html#Chinese">Chinese</A>	GB_2312-80	   <A HREF="change.html#x">x</A>
  (Simplified)	GBT_12345-90	   <A HREF="change.html#x">x</A>
		MAC		   <A HREF="change.html#x">x</A>
		GBT-90_MAC	   <A HREF="change.html#x">x</A>
		GBK			   <A HREF="change.html#x">x</A>
		ISO10646			  <A HREF="change.html#x">x</A>	  <A HREF="change.html#x">x</A>

<B><FONT COLOR="PURPLE">				euc-tw	 big5	ucs-2	utf-8 </FONT></B>
  <A HREF="mbyte.html#Chinese">Chinese</A>	CNS_1993	   <A HREF="change.html#x">x</A>
  (Traditional)	BIG5			   <A HREF="change.html#x">x</A>
		ETEN			   <A HREF="change.html#x">x</A>
		ISO10646			  <A HREF="change.html#x">x</A>	  <A HREF="change.html#x">x</A>

<B><FONT COLOR="PURPLE">				euc-jp	 sjis	ucs-2	utf-8 </FONT></B>
  <A HREF="mbyte.html#Japanese">Japanese</A>	JIS_C_1978	   <A HREF="change.html#x">x</A>	   <A HREF="change.html#x">x</A>
		JIS_X_1983	   <A HREF="change.html#x">x</A>	   <A HREF="change.html#x">x</A>
		JIS_X_1990	   <A HREF="change.html#x">x</A>		  <A HREF="change.html#x">x</A>	  <A HREF="change.html#x">x</A>
		MSWINDOWS	   <A HREF="change.html#x">x</A>
		KANJITALK6	   <A HREF="change.html#x">x</A>
		KANJITALK7	   <A HREF="change.html#x">x</A>

<B><FONT COLOR="PURPLE">				euc-kr	 cp949	ucs-2	utf-8 </FONT></B>
  <A HREF="mbyte.html#Korean">Korean</A>	KS_X_1992	   <A HREF="change.html#x">x</A>
		MAC		   <A HREF="change.html#x">x</A>
		MSWINDOWS		   <A HREF="change.html#x">x</A>
		ISO10646			  <A HREF="change.html#x">x</A>	  <A HREF="change.html#x">x</A>

To set up the correct encoding and character set for <A HREF="#printing">printing</A> some
<A HREF="mbyte.html#Japanese">Japanese</A> text you would <A HREF="diff.html#do">do</A> the following;
<B>	:set printencoding=euc-jp</B>
<B>	:set printmbcharset=JIS_X_1983</B>

If <A HREF="options.html#'printmbcharset'">'printmbcharset'</A> is not one of the above values then <A HREF="motion.html#it">it</A> is assumed to
specify a custom <A HREF="mbyte.html#multi-byte">multi-byte</A> character set and no check will be made that <A HREF="motion.html#it">it</A> is
compatible with the value for <A HREF="options.html#'printencoding'">'printencoding'</A>.  Vim will look for a file
defining the character set in the &quot;print&quot; directory in <A HREF="options.html#'runtimepath'">'runtimepath'</A>.


							*<A NAME="pmbfn-option"></A><B>pmbfn-option</B>*
<A HREF="options.html#'printmbfont'">'printmbfont'</A> <A HREF="options.html#'pmbfn'">'pmbfn'</A>	<A HREF="eval.html#string">string</A> (default &quot;&quot;)
			global
This is a comma-separated <A HREF="eval.html#list">list</A> of fields for font names to be used when
generating CJK output from |<A HREF="#:hardcopy">:hardcopy</A>|.  Each font name has to be preceded
with a <A HREF="#letter">letter</A> indicating the style the font is to be used for <A HREF="motion.html#as">as</A> follows:

  r:{font-name}		font to use for normal characters
  b:{font-name}		font to use for <A HREF="syntax.html#bold">bold</A> characters
  i:{font-name}		font to use for <A HREF="syntax.html#italic">italic</A> characters
  o:{font-name}		font to use for bold-italic characters

A field with the <A HREF="change.html#r">r</A>: prefix must be specified when doing CJK <A HREF="#printing">printing</A>.  The
other fontname specifiers are optional.  If a specifier is missing then
another font will be used <A HREF="motion.html#as">as</A> follows:

  if <A HREF="eval.html#b:">b:</A> is missing, then use <A HREF="change.html#r">r</A>:
  if <A HREF="insert.html#i">i</A>: is missing, then use <A HREF="change.html#r">r</A>:
  if <A HREF="insert.html#o">o</A>: is missing, then use <A HREF="eval.html#b:">b:</A>

Some CJK fonts <A HREF="diff.html#do">do</A> not contain characters for codes in the ASCII code range.
Also, some characters in the CJK ASCII code ranges differ in a few code points
from traditional ASCII characters.  There are two additional fields to <A HREF="intro.html#control">control</A>
<A HREF="#printing">printing</A> of characters in the ASCII code range.

  c:yes			Use Courier font for characters in the ASCII
  c:no (default)	code range.

  a:yes			Use ASCII character set for codes in the ASCII
  a:no (default)	code range.

The following is an example of specifying two <A HREF="mbyte.html#multi-byte">multi-byte</A> fonts, one for normal
and <A HREF="syntax.html#italic">italic</A> <A HREF="#printing">printing</A> and one for <A HREF="syntax.html#bold">bold</A> and bold-italic <A HREF="#printing">printing</A>, and using
Courier to print codes in the ASCII code range but using the national
character set:
<B>	:set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,c:yes</B>
 

							*<A NAME="popt-option"></A><B>popt-option</B>*
<A HREF="options.html#'printoptions'">'printoptions'</A> <A HREF="options.html#'popt'">'popt'</A>	<A HREF="eval.html#string">string</A> (default &quot;&quot;)
			global
This is a comma-separated <A HREF="eval.html#list">list</A> of items that <A HREF="intro.html#control">control</A> the format of the output
of YXXY:hardcopy|:

  left:{spec}		left margin (default: 10pc)
  right:{spec}		right margin (default: 5pc)
  top:{spec}		top margin (default: 5pc)
  bottom:{spec}		bottom margin (default: 5pc)
			{spec} is a number followed by &quot;in&quot; for inches, &quot;pt&quot;
			for points (1 point is 1/72 of an inch), &quot;mm&quot; for
			millimeters or &quot;pc&quot; for a percentage of the media
			size.
			Weird example:
			    left:2in,top:30pt,right:16mm,bottom:3pc
			If the unit is not recognized there is no error and
			the default value is used.

  header:{nr}		<A HREF="eval.html#Number">Number</A> of lines to reserve for the header.
			Only the first line is actually filled, thus when {nr}
			is 2 there is one empty line.  The header is formatted
			according to <A HREF="options.html#'printheader'">'printheader'</A>.
  header:0		Do not print a header.
  header:2  (default)	Use two lines for the header

  syntax:n		Do not use <A HREF="syntax.html#syntax">syntax</A> highlighting.  This is faster and
			thus useful when <A HREF="#printing">printing</A> large files.
  syntax:y		Do <A HREF="syntax.html#syntax">syntax</A> highlighting.
  syntax:a  (default)	Use <A HREF="syntax.html#syntax">syntax</A> highlighting if the printer appears to be
			able to print color or grey.

  number:y		Include line numbers in the printed output.
  number:n  (default)	No line numbers.

  wrap:y    (default)	Wrap long lines.
  wrap:n		Truncate long lines.

  duplex:off		Print on one side.
  duplex:long (default)	Print on both sides (when possible), bind on long
			side.
  duplex:short		Print on both sides (when possible), bind on short
			side.

  collate:y  (default)	Collating: 1 2 3, 1 2 3, 1 2 3
  collate:n		No collating: 1 1 1, 2 2 2, 3 3 3

  jobsplit:n (default)	Do all copies in one print <A HREF="channel.html#job">job</A>
  jobsplit:y		Do each copy <A HREF="motion.html#as">as</A> a separate print <A HREF="channel.html#job">job</A>.  Useful when
			doing N-up postprocessing.

  portrait:y (default)	Orientation is portrait.
  portrait:n		Orientation is landscape.

						*<A NAME="a4"></A><B>a4</B>* *<A NAME="letter"></A><B>letter</B>*
  paper:A4   (default)	Paper size: A4
  paper:{name}		Paper size from this table:
<B><FONT COLOR="PURPLE">			{name}	    size in cm	     size in inch </FONT></B>
			10x14	    <A HREF="usr_25.html#25.4">25.4</A>  <A HREF="change.html#x">x</A> 35.57    10    <A HREF="change.html#x">x</A> 14
			A3	    29.7  <A HREF="change.html#x">x</A> <A HREF="usr_42.html#42">42</A>	     11.69 <A HREF="change.html#x">x</A> 16.54
			A4	    21	  <A HREF="change.html#x">x</A> 29.7      8.27 <A HREF="change.html#x">x</A> 11.69
			A5	    14.8  <A HREF="change.html#x">x</A> 21	      5.83 <A HREF="change.html#x">x</A>  8.27
			B4	    25	  <A HREF="change.html#x">x</A> 35.3     10.12 <A HREF="change.html#x">x</A> 14.33
			B5	    17.6  <A HREF="change.html#x">x</A> 25	      7.17 <A HREF="change.html#x">x</A> 10.12
			executive   18.42 <A HREF="change.html#x">x</A> 26.67     7.25 <A HREF="change.html#x">x</A> <A HREF="usr_10.html#10.5">10.5</A>
			folio	    21	  <A HREF="change.html#x">x</A> 33	      8.27 <A HREF="change.html#x">x</A> 13
			ledger	    43.13 <A HREF="change.html#x">x</A> 27.96    17    <A HREF="change.html#x">x</A> 11
			legal	    21.59 <A HREF="change.html#x">x</A> 35.57     8.5  <A HREF="change.html#x">x</A> 14
			<A HREF="#letter">letter</A>	    21.59 <A HREF="change.html#x">x</A> 27.96     8.5  <A HREF="change.html#x">x</A> 11
			quarto	    21.59 <A HREF="change.html#x">x</A> <A HREF="usr_27.html#27.5">27.5</A>      8.5  <A HREF="change.html#x">x</A> 10.83
			statement   13.97 <A HREF="change.html#x">x</A> 21.59     5.5  <A HREF="change.html#x">x</A>  8.5
			tabloid     27.96 <A HREF="change.html#x">x</A> 43.13    11    <A HREF="change.html#x">x</A> 17

  formfeed:n (default)	Treat form feed characters (0x0c) <A HREF="motion.html#as">as</A> a normal print
			character.
  formfeed:y		When a form feed character is encountered, continue
			<A HREF="#printing">printing</A> of the current line at the beginning of the
			first line on a new page.

The item indicated with (default) is used when the item is not present.  The
values are not always used, especially when using a <A HREF="gui_w32.html#dialog">dialog</A> to select the
printer and <A HREF="options.html#options">options</A>.
Example:
<B>	:set printoptions=paper:letter,duplex:off</B>

==============================================================================

3. PostScript Printing					*<A NAME="postscript-printing"></A><B>postscript-printing</B>*

						*<A NAME="E455"></A><B>E455</B>* *<A NAME="E456"></A><B>E456</B>* *<A NAME="E457"></A><B>E457</B>* *<A NAME="E624"></A><B>E624</B>*
Provided you have enough disk space there should be no problems generating a
PostScript file.  You need to have the runtime files correctly installed (if
you can find the help files, they probably are).

There are currently a number of limitations with PostScript <A HREF="#printing">printing</A>:

- <A HREF="options.html#'printfont'">'printfont'</A> - The font name is ignored (the Courier family is always used -
  <A HREF="motion.html#it">it</A> should be available on all PostScript printers) but the font size is
  used.

- <A HREF="options.html#'printoptions'">'printoptions'</A> - The duplex setting is used when generating PostScript
  output, but <A HREF="motion.html#it">it</A> is up to the printer to take notice of the setting.  If the
  printer does not support duplex <A HREF="#printing">printing</A> then <A HREF="motion.html#it">it</A> should be silently ignored.
  Some printers, however, don't print at all.

- 8-bit support - While a number of 8-bit print character encodings are
  supported <A HREF="motion.html#it">it</A> is possible that some characters will not print.  Whether a
  character will print depends on the font in the printer knowing the
  character.  Missing characters will be replaced with an upside down question
  <A HREF="motion.html#mark">mark</A>, or a space if that character is also not known by the font.  It may be
  possible to get all the characters in an encoding to print by installing a
  new version of the Courier font family.

- Multi-byte support - Currently Vim will try to convert <A HREF="mbyte.html#multi-byte">multi-byte</A> characters
  to the 8-bit encoding specified by <A HREF="options.html#'printencoding'">'printencoding'</A> (or latin1 if <A HREF="motion.html#it">it</A> is
  empty).  Any characters that are not successfully converted are shown <A HREF="motion.html#as">as</A>
  unknown characters.  Printing will fail if Vim cannot convert the <A HREF="mbyte.html#multi-byte">multi-byte</A>
  to the 8-bit encoding.

==============================================================================

4. Custom 8-bit Print Character Encodings	*<A NAME="postscript-print-encoding"></A><B>postscript-print-encoding</B>*

								*<A NAME="E618"></A><B>E618</B>* *<A NAME="E619"></A><B>E619</B>*
To use your own print character encoding when <A HREF="#printing">printing</A> 8-bit character data
you need to define your own PostScript font encoding vector.  Details on how
to define a font encoding vector is beyond the scope of this help file, but
you can find details in the PostScript Language Reference Manual, 3rd Edition,
published by Addison-Wesley and available in PDF form at
	<A HREF="http://www.adobe.com/">http://www.adobe.com/</A>. The following describes what you need to do for Vim to
locate and use your print character encoding.

<A HREF="insert.html#i">i</A>.   Decide on a unique name for your encoding vector, one that does not clash
     with any of the recognized or standard encoding names that Vim uses (see
     |<A HREF="mbyte.html#encoding-names">encoding-names</A>| for a list), and that no one else is likely to use.
ii.  Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
     <A HREF="options.html#'runtimepath'">'runtimepath'</A> and rename <A HREF="motion.html#it">it</A> with your unique name.
iii. Edit your renamed copy of latin1.ps, <A HREF="change.html#replacing">replacing</A> all occurrences of latin1
     with your unique name (don't forget the line starting &#37;&#37;Title:), and
     modify the array of glyph names to define your new encoding vector.  The
     array must have exactly 256 entries or you will not be able to print!
iv.  Within Vim, set <A HREF="options.html#'printencoding'">'printencoding'</A> to your unique encoding name and then
     print your file.  Vim will now use your custom print character encoding.

Vim will report an error with the resource file if you change the order or
content of the first 3 lines, other than the name of the encoding on the line
starting &#37;&#37;Title: or the version number on the line starting &#37;&#37;Version:.

[Technical explanation for those that know PostScript - Vim looks for a file
with the same name <A HREF="motion.html#as">as</A> the encoding <A HREF="motion.html#it">it</A> will use when <A HREF="#printing">printing</A>.  The file
defines a new PostScript Encoding resource called /VIM-name, where name is the
print character encoding Vim will use.]

==============================================================================

5. PostScript CJK Printing			*<A NAME="postscript-cjk-printing"></A><B>postscript-cjk-printing</B>*

							*<A NAME="E673"></A><B>E673</B>* *<A NAME="E674"></A><B>E674</B>* *<A NAME="E675"></A><B>E675</B>*

Vim supports <A HREF="#printing">printing</A> of <A HREF="mbyte.html#Chinese">Chinese</A>, <A HREF="mbyte.html#Japanese">Japanese</A>, and <A HREF="mbyte.html#Korean">Korean</A> files.  Setting up Vim
to correctly print CJK files requires setting up a few more <A HREF="options.html#options">options</A>.

Each of these countries has many standard character sets and encodings which
require that both be specified when <A HREF="#printing">printing</A>.  In addition, CJK fonts normally
<A HREF="diff.html#do">do</A> not have the concept of <A HREF="syntax.html#italic">italic</A> glyphs and use different weight or stroke
style to achieve emphasis when <A HREF="#printing">printing</A>.  This in turn requires a different
approach to specifying fonts to use when <A HREF="#printing">printing</A>.

The encoding and character set are specified with the <A HREF="options.html#'printencoding'">'printencoding'</A> and
<A HREF="options.html#'printmbcharset'">'printmbcharset'</A> <A HREF="options.html#options">options</A>.  If <A HREF="options.html#'printencoding'">'printencoding'</A> is not specified then <A HREF="options.html#'encoding'">'encoding'</A>
is used <A HREF="motion.html#as">as</A> normal.  If <A HREF="options.html#'printencoding'">'printencoding'</A> is specified then characters will be
translated to this encoding for <A HREF="#printing">printing</A>.  You should ensure that the encoding
is compatible with the character set needed for the file contents or some
characters may not appear when printed.

The fonts to use for CJK <A HREF="#printing">printing</A> are specified with <A HREF="options.html#'printmbfont'">'printmbfont'</A>.  This
option allows you to specify different fonts to use when <A HREF="#printing">printing</A> characters
which are <A HREF="syntax.html#syntax">syntax</A> highlighted with the font styles normal, <A HREF="syntax.html#italic">italic</A>, <A HREF="syntax.html#bold">bold</A> and
bold-italic.

No CJK fonts are supplied with Vim.  There are some free <A HREF="mbyte.html#Korean">Korean</A>, <A HREF="mbyte.html#Japanese">Japanese</A>, and
Traditional <A HREF="mbyte.html#Chinese">Chinese</A> fonts available at:

	<A HREF="http://examples.oreilly.com/cjkvinfo/adobe/samples/">http://examples.oreilly.com/cjkvinfo/adobe/samples/</A>

You can find descriptions of the various fonts in the read me file at

	<A HREF="http://examples.oreilly.de/english_examples/cjkvinfo/adobe/00README">http://examples.oreilly.de/english_examples/cjkvinfo/adobe/00README</A>

Please read your printer documentation on how to <A HREF="usr_90.html#install">install</A> new fonts.

CJK fonts can be large containing several thousand glyphs, and <A HREF="motion.html#it">it</A> is not
uncommon to find that they only contain a subset of a national standard.  It
is not unusual to find the fonts to not include characters for codes in the
ASCII code range.  If you find half-width Roman characters are not appearing
in your printout then you should configure Vim to use the Courier font the
half-width ASCII characters with <A HREF="options.html#'printmbfont'">'printmbfont'</A>.  If your font does not include
other characters then you will need to find another font that does.

Another issue with ASCII characters, is that the various national character
sets specify a couple of different glyphs in the ASCII code range.  If you
print ASCII text using the national character set you may see some unexpected
characters.  If you want true ASCII code <A HREF="#printing">printing</A> then you need to configure
Vim to output ASCII characters for the ASCII code range with <A HREF="options.html#'printmbfont'">'printmbfont'</A>.

It is possible to define your own <A HREF="mbyte.html#multi-byte">multi-byte</A> character set although this
should not be attempted lightly.  A discussion on the process if beyond the
scope of these help files.  You can find details on CMap (character map) files
in the document 'Adobe CMap and CIDFont Files Specification, Version 1.0',
 available from	<A HREF="http://www.adobe.com">http://www.adobe.com</A> as a PDF file.

==============================================================================

6. PostScript Printing Troubleshooting		*<A NAME="postscript-print-trouble"></A><B>postscript-print-trouble</B>*

									*<A NAME="E621"></A><B>E621</B>*
Usually the only sign of a problem when <A HREF="#printing">printing</A> with PostScript is that your
printout does not appear.  If you are lucky you may get a printed page that
tells you the PostScript <A HREF="motion.html#operator">operator</A> that generated the error that prevented the
print <A HREF="channel.html#job">job</A> completing.

There are a number of possible causes <A HREF="motion.html#as">as</A> to why the <A HREF="#printing">printing</A> may have failed:

- Wrong version of the prolog resource file.  The prolog resource file
  contains some PostScript that Vim needs to be able to print.  Each version
  of Vim needs one particular version.  Make sure you have correctly installed
  the runtime files, and don't have any old versions of a file called prolog
  in the print directory in your <A HREF="options.html#'runtimepath'">'runtimepath'</A> directory.

- Paper size.  Some PostScript printers will abort <A HREF="#printing">printing</A> a file if they <A HREF="diff.html#do">do</A>
  not support the requested paper size.  By default Vim uses A4 paper.  Find
  out what size paper your printer normally uses and set the appropriate paper
  size with <A HREF="options.html#'printoptions'">'printoptions'</A>.  If you cannot find the name of the paper used,
  measure a sheet and compare <A HREF="motion.html#it">it</A> with the table of supported paper sizes listed
  for <A HREF="options.html#'printoptions'">'printoptions'</A>, using the paper that is closest in both width AND height.
  Note: The dimensions of actual paper may vary slightly from the ones listed.
  If there is no paper listed close enough, then you may want to try psresize
  from PSUtils, discussed below.

- Two-sided <A HREF="#printing">printing</A> (duplex).  Normally a PostScript printer that does not
  support two-sided <A HREF="#printing">printing</A> will ignore any request to <A HREF="diff.html#do">do</A> <A HREF="motion.html#it">it</A>.  However, some
  printers may abort the <A HREF="channel.html#job">job</A> altogether.  Try <A HREF="#printing">printing</A> with duplex turned off.
  Note: Duplex prints can be achieved manually using PS utils - see below.

- Collated <A HREF="#printing">printing</A>.  As with Duplex <A HREF="#printing">printing</A>, most PostScript printers that
  <A HREF="diff.html#do">do</A> not support collating printouts will ignore a request to <A HREF="diff.html#do">do</A> so.  Some may
  not.  Try <A HREF="#printing">printing</A> with collation turned off.

- <A HREF="autocmd.html#Syntax">Syntax</A> highlighting.  Some print management code may prevent the generated
  PostScript file from being printed on a black and white printer when <A HREF="syntax.html#syntax">syntax</A>
  highlighting is turned on, even if solid black is the only color used.  Try
  <A HREF="#printing">printing</A> with <A HREF="syntax.html#syntax">syntax</A> highlighting turned off.

A safe printoptions setting to try is:

<B>	:set printoptions=paper:A4,duplex:off,collate:n,syntax:n</B>

<A HREF="insert.html#Replace">Replace</A> &quot;A4&quot; with the paper size that best matches your printer paper.

==============================================================================

7. PostScript Utilities				*<A NAME="postscript-print-util"></A><B>postscript-print-util</B>*

7.1 Ghostscript

Ghostscript is a PostScript and PDF interpreter that can be used to display
and print on non-PostScript printers PostScript and PDF files.  It can also
generate PDF files from PostScript.

Ghostscript will run on a wide variety of platforms.

There are three available versions:

- AFPL Ghostscript (formerly Aladdin Ghostscript) which is free for
  non-commercial use.  It can be obtained from:

	<A HREF="http://www.cs.wisc.edu/~ghost/">http://www.cs.wisc.edu/~ghost/</A>

- GNU Ghostscript which is available under the GNU General Public License.  It
  can be obtained from:

	<A HREF="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/</A>

- A commercial version for inclusion in commercial products.

Additional information on Ghostscript can also be found at:

	<A HREF="http://www.ghostscript.com/">http://www.ghostscript.com/</A>

Support for a number of non PostScript printers is provided in the
<A HREF="intro.html#distribution">distribution</A> <A HREF="motion.html#as">as</A> standard, but if you cannot find support for your printer
check the Ghostscript site for other printers not included by default.


7.2 Ghostscript Previewers.

The interface to Ghostscript is very primitive so a number of graphical front
ends have been created.  These allow easier PostScript file selection,
previewing at different zoom levels, and <A HREF="#printing">printing</A>.  Check supplied
documentation for full details.

<A HREF="options.html#X11">X11</A>

- Ghostview.  Obtainable from:

	<A HREF="http://www.cs.wisc.edu/~ghost/gv/">http://www.cs.wisc.edu/~ghost/gv/</A>

- <A HREF="visual.html#gv">gv</A>.  Derived from Ghostview.  Obtainable from:

	<A HREF="http://wwwthep.physik.uni-mainz.de/~plass/gv/">http://wwwthep.physik.uni-mainz.de/~plass/gv/</A>

  Copies (possibly not the most recent) can be found at:

	<A HREF="http://www.cs.wisc.edu/~ghost/gv/">http://www.cs.wisc.edu/~ghost/gv/</A>

OpenVMS

- Is apparently supported in the main code now (untested).  See:

	<A HREF="http://wwwthep.physik.uni-mainz.de/~plass/gv/">http://wwwthep.physik.uni-mainz.de/~plass/gv/</A>

Windows and <A HREF="os_os2.html#OS/2">OS/2</A>

- GSview.  Obtainable from:

	<A HREF="http://www.cs.wisc.edu/~ghost/gsview/">http://www.cs.wisc.edu/~ghost/gsview/</A>

<A HREF="os_dos.html#DOS">DOS</A>

- ps_view.  Obtainable from:

	<A HREF="ftp://ftp.pg.gda.pl/pub/TeX/support/ps_view/">ftp://ftp.pg.gda.pl/pub/TeX/support/ps_view/</A>
	<A HREF="ftp://ftp.dante.de/tex-archive/support/ps_view/">ftp://ftp.dante.de/tex-archive/support/ps_view/</A>

Linux

- GSview.  Linux version of the popular Windows and <A HREF="os_os2.html#OS/2">OS/2</A> previewer.
  Obtainable from:

	<A HREF="http://www.cs.wisc.edu/~ghost/gsview/">http://www.cs.wisc.edu/~ghost/gsview/</A>

- BMV.  Different from Ghostview and <A HREF="visual.html#gv">gv</A> in that <A HREF="motion.html#it">it</A> doesn't use X but svgalib.
  Obtainable from:

	<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz">ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz</A>


7.3 PSUtils

PSUtils is a collection of utility programs for manipulating PostScript
documents.  Binary distributions are available for many platforms, <A HREF="motion.html#as">as</A> well <A HREF="motion.html#as">as</A>
the full source.  PSUtils can be found at:

	<A HREF="http://knackered.org/angus/psutils">http://knackered.org/angus/psutils</A>

The utilities of interest include:

- psnup.     Convert PS files for N-up <A HREF="#printing">printing</A>.
- psselect.  <A HREF="visual.html#Select">Select</A> page range and order of <A HREF="#printing">printing</A>.
- psresize.  Change the page size.
- psbook.    Reorder and lay out pages ready for making a <A HREF="intro.html#book">book</A>.

The output of one program can be used <A HREF="motion.html#as">as</A> the input to the next, allowing for
complex print document creation.


N-UP PRINTING

The psnup utility takes an existing PostScript file generated from Vim and
convert <A HREF="motion.html#it">it</A> to an n-up version.  The simplest way to create a 2-up printout is
to first create a PostScript file with:

<B>	:hardcopy &gt; test.ps</B>

Then on your command line execute:

<B>	psnup -n 2 test.ps final.ps</B>

Note: You may get warnings from some Ghostscript previewers for files produced
by psnup - these may safely be ignored.

Finally print the file final.ps to your PostScript printer with your
platform's print command.  (You will need to delete the two PostScript files
afterwards yourself.)  <A HREF="options.html#'printexpr'">'printexpr'</A> could be modified to perform this extra
step before <A HREF="#printing">printing</A>.


ALTERNATE DUPLEX PRINTING

It is possible to achieve a poor man's version of duplex <A HREF="#printing">printing</A> using the PS
utility psselect.  This utility has <A HREF="options.html#options">options</A> <A HREF="starting.html#-e">-e</A> and <A HREF="starting.html#-o">-o</A> for <A HREF="#printing">printing</A> just the
even or odd pages of a PS file respectively.

First generate a PS file with the 'hardcopy' command, then generate new
files with all the odd and even numbered pages with:

<B>	psselect -o test.ps odd.ps</B>
<B>	psselect -e test.ps even.ps</B>

Next print odd.ps with your platform's normal print command.  Then take the
print output, turn <A HREF="motion.html#it">it</A> over and place <A HREF="motion.html#it">it</A> back in the paper feeder.  Now print
even.ps with your platform's print command.  All the even pages should now
appear on the back of the odd pages.

There are a couple of points to bear in mind:

1. Position of the first page.  If the first page is on top of the printout
   when <A HREF="#printing">printing</A> the odd pages then you need to reverse the order that the odd
   pages are printed.  This can be done with the <A HREF="starting.html#-r">-r</A> option to psselect.  This
   will ensure page 2 is printed on the back of page 1.
   Note: <A HREF="motion.html#it">it</A> is better to reverse the odd numbered pages rather than the even
   numbered in <A HREF="change.html#case">case</A> there are an odd number of pages in the original PS file.

2. Paper flipping.  When turning over the paper with the odd pages printed on
   them you may have to either flip them horizontally (along the long edge) or
   vertically (along the short edge), <A HREF="motion.html#as">as</A> well <A HREF="motion.html#as">as</A> possibly rotating them 180
   degrees.  All this depends on the printer - <A HREF="motion.html#it">it</A> will be more obvious for
   desktop ink jets than for small office laser printers where the paper path
   is hidden from <A HREF="starting.html#view">view</A>.


==============================================================================

8. Formfeed Characters					*<A NAME="printing-formfeed"></A><B>printing-formfeed</B>*

By default Vim does not <A HREF="diff.html#do">do</A> any special processing of |<A HREF="intro.html#formfeed">formfeed</A>| <A HREF="intro.html#control">control</A>
characters.  Setting the <A HREF="options.html#'printoptions'">'printoptions'</A> <A HREF="intro.html#formfeed">formfeed</A> item will make Vim recognize
<A HREF="intro.html#formfeed">formfeed</A> characters and continue <A HREF="#printing">printing</A> the current line at the beginning
of the first line on a new page.  The use of <A HREF="intro.html#formfeed">formfeed</A> characters provides
rudimentary print <A HREF="intro.html#control">control</A> but there are certain things to be aware of.

Vim will always start <A HREF="#printing">printing</A> a line (including a line number if enabled)
containing a <A HREF="intro.html#formfeed">formfeed</A> character, even if <A HREF="motion.html#it">it</A> is the first character on the
line.  This means if a line starting with a <A HREF="intro.html#formfeed">formfeed</A> character is the first
line of a page then Vim will print a blank page.

Since the line number is printed at the start of <A HREF="#printing">printing</A> the line containing
the <A HREF="intro.html#formfeed">formfeed</A> character, the remainder of the line printed on the new page
will not have a line number printed for <A HREF="motion.html#it">it</A> (in the same way <A HREF="motion.html#as">as</A> the wrapped
lines of a long line when wrap in <A HREF="options.html#'printoptions'">'printoptions'</A> is enabled).

If the <A HREF="intro.html#formfeed">formfeed</A> character is the last character on a line, then <A HREF="#printing">printing</A> will
continue on the second line of the new page, not the first.  This is due to
Vim processing the end of the line after the <A HREF="intro.html#formfeed">formfeed</A> character and moving
down a line to continue <A HREF="#printing">printing</A>.

Due to the points made above <A HREF="motion.html#it">it</A> is recommended that when <A HREF="intro.html#formfeed">formfeed</A> character
processing is enabled, <A HREF="#printing">printing</A> of line numbers is disabled, and that form
feed characters are not the last character on a line.  Even then you may need
to adjust the number of lines before a <A HREF="intro.html#formfeed">formfeed</A> character to prevent
accidental blank pages.

==============================================================================
<A HREF="#top">top</A> - <A HREF="index.html">main help file</A>
</PRE>
</BODY>


</HTML>