Categories


Popular topics


The "Page setup" dialog allows you to set options for printing page headers, footers, margins, line numbers, as well as other parts of the active file.

Both the page header and page footer, if configured, are printed at the top and bottom, respectively, 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 of the file.

To disable the header and/or footer, check the Disable header or Disable footer checkboxes as desired.

To disable the horizontal line for the header and/or footer, check the Disable separator or Disable separator options under the header and/or footer options as desired.

The format for both the header and footer can be customized in the "Page setup" dialog via special placeholder characters used in the header and footer options text field. When printed, the special characters are replaced as follows:

&f the full file name including path.
&fl the first line of the file.
&n the file name only (no path).
&p the page number.
&t the total number of pages.
&l aligns the text following the "&l" to the left side of the header/footer area.
&c aligns the text following the "&c" to the center of the header/footer area.
&r 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 and/or footer may include the file date and time or system date and time. Two radio buttons allow the selection of either the file time or the system time to be included in the header or footer.

Special characters used to specify the time and date format, shown in the following table. To omit the date/time, omit these characters from the header / footer formats.

%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

Examples:

Date is July, 4th 2014. Time is 9:00 p.m.

%X, %x" prints 21:00, 07/04/14
%c prints 07/04/14 21:00

Date is Jan, 10th 2017. Time is 5:00 a.m.

%A, %B %d, %Y %I:%M%p prints Tuesday, January 10, 2017 05:00:am

Margins
You can set up page margins in either inches (Inch) 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's settings are configured with a minimum margin that is greater than the margin set in UltraEdit, then the printer's margin settings will override UltraEdit's.

Page break code
The page break code may be set to any ASCII character. The page break code defaults to the form-feed character "12" (hex 0C). You can change this if required, but don't set this to any printable character as a page break will be inserted on every occurrence of the character when printing. It may be desirable to change this character if the font being used does not show the page break character in the editor.

Wrap text when printing
If checked, text exceeding the page width will be wrapped when printed.

Print line numbers
If checked, line numbers are 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 of whether or not line numbers are visible in the editor.

Print 2 pages on 1 sheet
If checked, two logical pages are 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.

Print syntax highlighting
If checked, the colors (if any) used for syntax highlighting are printed in color (if the printer supports it) as well as any font styling. Colors will print as shades of gray on a Postscript monochrome printer.

Use Classic theme for printing
If this option is selected, the Classic theme will be used when printing. If this is not selected, the active theme will be used. This option is particularly useful for saving ink if a darker editor theme is in use.

See also:

MediaWiki spam blocked by CleanTalk.