print command

Use the print command to print the current document.

 

Syntax

print [ block
      | bottomMargin n
      | endElement n
      | font fontName
      | leftMargin n
      | lineNumbers { on | off }
      | rightMargin n
      | startElement n
      | tokenized { on | off }
      | topMargin n
      | visible
      ] [...] 

 

Parameters

block Use the optional block parameter to indicate that only the selected text should be printed.
bottomMargin n Use the optional bottomMargin parameter to indicate the bottom margin.  n indicates the number of pixels that should be used for the bottom margin.  n must be an integer that is greater than or equal to zero.  If you do not specify bottomMargin, the setting is taken from the current.print.bottomMargin parameter.
endElement n Use the optional endElement parameter to indicate the last element that you want printed.  n must be a positive integer.  If you do not specify the end element, printing continues to the end of the document.
font fontName Use the optional font parameter to indicate the font that you want to print with.  If you do not specify font, the setting is taken from the current.print.font parameter.  If the print.font parameter is not set, the font is taken from the current view.

The fontName parameter should be in one of the following formats: 

  • fontname-style-height
  • fontname-height
  • fontname-style
  • fontname

where style is one of the three strings "bold", "bolditalic", or "italic", and height is a decimal representation of the font height.

leftMargin n Use the optional leftMargin parameter to indicate the left margin.  n indicates the number of pixels that should be used for the left margin.  n must be an integer that is greater than or equal to zero.  If you do not specify leftMargin, the setting is taken from the current.print.leftMargin parameter.
lineNumbers
{ on | off }
Use the optional lineNumbers parameter to indicate whether line numbers should be printed to the left of each line.  If you do not specify lineNumbers, the setting is taken from the current.print.lineNumbers parameter.
rightMargin n Use the optional rightMargin parameter to indicate the right margin.  n indicates the number of pixels that should be used for the right margin.  n must be an integer that is greater than or equal to zero.  If you do not specify rightMargin, the setting is taken from the current.print.rightMargin parameter.
startElement n Use the optional startElement parameter to indicate the first element that you want printed.  n must be a positive integer.  If you do not specify a starting element, printing starts at the top of the document.
tokenized
{ on | off }
Use the optional tokenized parameter to indicate whether the printed text should be tokenized.  If you do not specify tokenized, the setting is taken from the current.print.tokenized parameter.
topMargin n Use the optional topMargin parameter to indicate the top margin.  n indicates the number of pixels that should be used for the top margin.  n must be an integer that is greater than or equal to zero.  If you do not specify topMargin, the setting is taken from the current.print.topMargin parameter.
visible Use the optional visible parameter to indicate that only visible lines should be printed.

 

Status

The status parameter is not affected by this command.

 

Examples

print
print tokenized 

Related concepts
Editor commands, actions, and parameters

Related reference
block command
print.bottomMargin parameter
print.font parameter
print.footer parameter
print.header parameter
print.leftMargin parameter
print.lineNumbers parameter
print.rightMargin parameter
print.tokenized parameter
print.topMargin parameter
visible parameter
print action
Default editor commands