Page Setup command
The Page Setup menu item presents a dialog allowing the user to set up page headers, footers and margins for printing. The page header, if configured, is printed at the top of every page. The page footer, if configured, is printed at the bottom of every page. If a page footer or header is configured, a single line is printed across the page between the header or footer and the text to be printed.
The header or footer may be disabled by selecting the appropriate check box. If the header or footer is enabled, the separator line that is normally printed between the header/footer and the page text may optionally be disabled.
The page header and footer may include text defined by the user, and additionally special characters to allow the file name and page numbers to be printed in the header or footer.
The special characters are:
&f This is replaced in the header or footer with the full file name including path.
&fl This is replaced in the header or footer with the first line of the file.
&n This is replaced in the header or footer with the file name only (no path).
&p This is replaced in the header or footer with the page number.
&t This is replaced in the header or footer with the total number of pages.
&l This aligns the text following the "&l" to the left side of the header/footer area.
&c This aligns the text following the "&c" to the center of the header/footer area.
&r This aligns the text following the "&r" to the right side of the header/footer area.
(Note - the alignment characters are not required, and any or all of them may appear in a single header or footer. However, if more than one is present, they must be in the order above -- "&l" must be before "& c" and "&c" must be before "&r").
Additionally, the header or footer may include the file date and time or system date and time. Two radio buttons allow the selection of either the file date, or the system date to be included in the header or footer. The radio buttons select the source of the date and time, additional special characters used in the header or footer specify if the date and time are to be printed and what format is used.
The characters used to specify the time and date format are shown below, the absence of any of these characters result in the time and date not being printed.
The formatting codes date and time are listed below:
%a Abbreviated weekday name
%A Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation appropriate for the locale
%d Day of the month as a decimal number (01-31)
%H Hour in 24-hour format (00-23)
%I Hour in 12-hour format (01-12)
%j Day of the year as a decimal number (001-366)
%m Month as a decimal number (01-12)
%M Minute as a decimal number (00-59)
%p Current locale's AM/PM indicator for a 12-hour clock
%S Second as a decimal number (00-59)
%U Week of the year as a decimal number, with Sunday as the first day of the week (00-51)
%w Weekday as a decimal number (0-6; Sunday is 0)
%W Week of the year as a decimal number, with Monday as the first day of the week (00-51)
%x Date representation for current locale
%X Time representation for current locale
%y Year without the century as a decimal number (00-99)
%Y Year with the century as a decimal number
%Z Time zone name or abbreviation; no characters if time zone is unknown
%% Percent sign
Date is July, 4th 1994. Time is 9:00pm
"%X , %x" prints "21:00 , 07/04/94"
Date is July, 4th 1994. Time is 9:00pm
"% c" prints 07/04/94 21:00
Date is Jan, 10th 1991. Time is 5:00am
"%A, %B %d, %Y %I:%M%p" prints Tuesday, January 10, 1991 05:00:am
The page margins may be set up in either inches or millimeters (mm). Each margin, top, bottom, left and right may be set independently. The margins are applied before the headers and footers are generated. If the printer is set up to have a minimum margin that is greater than the margin selected in UltraEdit the printer margin will be in effect.
Page break code
The page break code may be set to any ASCII character. The page break code defaults to a form-feed character ,12 (0C HEX). This may be changed if required but should not be set to any printable character as a page break will be inserted on every occurrence of this character when printing occurs. It may be desirable to change this character if the font being used does not allow the page break character to be seen.
Wrap text when printing
This option when set will automatically cause the printed output to wrap the text to additional lines of any line that exceeds the width of the printable area of the page.
Print line numbers
This option when set causes the line numbers to be printed for each line on the left hand side of each page. If a line is wrapped, the line number is printed with the first line only. This setting is independent from the Display Line Number setting.
Print 2 pages on 1 sheet
This option allows two logical pages to be printed on a single sheet of paper. The logical page data is scaled to print two pages side-by-side. This scaling may mean that a little more or less data may fit side-by-side than when the pages are printed on a single sheet.
This option is particularly useful for saving paper on printouts.
Print syntax highlighting
This option instructs UltraEdit to print the file with the color used for syntax highlighting if a color printer is used. This will also show shades of gray on a Postscript monochrome printer.
|Posted - Thu, Oct 13, 2011 6:24 PM. This article has been viewed 6143 times.|
|Online URL: http://www.ultraedit.com/help/article/page-setup-command-1293.html|
Powered by PHPKB Knowledge Base Software