HTBasic Help
×
Menu
Index

CONFIGURE DUMP

Specifies the graphic printer language for DUMP.
 
 CONFIGURE DUMP TO language
 
Where:
language = string expression naming the printer language and driver options
 
Usage:
CONFIGURE DUMP TO "PCL"
 
Example:     CONFIGURE DUMP.BAS
 
Description:
CONFIGURE DUMP specifies what graphic printer language the DUMP statement uses. The language string expression specifies the name of a driver. When CONFIGURE DUMP is specified, dumps are directed to that driver. It is recommended that CONFIGURE DUMP statements be included in your AUTOST file to load any necessary drivers.
 
The following information is for reference only. See the Getting Started Guide for more specific information. The following table lists the drivers available at the time of this manual printing.
 
Name                For these printers                  
PCL                Advanced HP-PCL driver
PS-DUMP                Postscript printers, devices and files
GIF                Graphic Interchange Format files
WIN-DUMP                Send the dump to the default Windows printer
As an example, if you wish to use a PCL printer for screen dumps on ISC 26, use the following command to change to the HP printer control language:
 
DUMP DEVICE IS 26
CONFIGURE DUMP TO "PCL"
 
If a DUMP is made before doing a CONFIGURE DUMP, HTBasic automatically loads and uses the WIN-DUMP driver.
 
Number of Colors
The number of colors in the DUMP depends on both the dump driver and the display driver. All dump drivers support black and white dumps. Some dump drivers can also handle 16 or 256 colors. The same is true of display drivers. If both the display and dump drivers support 256 colors, the dump is made in 256 colors. Otherwise if both support 16 colors, the dump is made in 16 colors. Otherwise, the dump is made in black and white.
 
Options
It is sometimes necessary to specify options to the drivers. Options are included by appending a semicolon to the driver name, followed by the options. The following specific driver sections contain more details on these options.
 
PCL Driver
The PCL dump driver provides support for devices and software that accept the Hewlett-Packard PCL printer language. The driver supports both DUMP ALPHA and DUMP GRAPHICS from bitmapped displays.
 
The PCL driver is loaded with a line like
CONFIGURE DUMP TO "PCL[;options]"
 
Options
The options are listed after the semicolon in the driver name, within the quotes. If more than one option is specified, the option names are separated by commas. When no options are given, output from the PCL driver is the same as the HP-PCL driver. The options are as follows:
 
ADJUST. Certain display adapters common in the PC environment use pixels that have different sizes in the horizontal and vertical directions. All pixels are considered to be square and the dump is made using the aspect ratio of the window running HTBasic.
 
BW. This option tells the printer to dump using white for the areas on the screen that were drawn using PEN 0 and black for the areas drawn with any other PEN. This option is the default; it need not be specified explicitly.
 
COLOR, CCMY, C16, and C256. These options cause the dump to be done in color to a color printer. The COLOR option uses the printer's default 8-color solid-color palette (black, white, red, green, blue, cyan, magenta, and yellow), mapping each color on the screen to the closest one from the palette. COLOR uses the default RGB palette to dump the screen; CCMY uses the default CMY palette. The C16 and C256 options use a 16- or 256-color palette on the printer, and only work with printers that have settable color palettes such as the PaintJet series and the DeskJet 1200C. With printers that use dithering to print mixed colors, you may have to specify a coarser resolution than the printer is capable of in order to enable the dithering; for example, on the original PaintJet printer, C16 and DPI90 together are needed to produce dithering; C16 and DPI180 cause the printer to use only the 8 default colors when printing.
 
Printing using the COLOR and CCMY options swaps black and white colors when printing, unless the INVERT option is also used.
 
When using the solid-color palette with older PaintJet printers, the COLOR option should be used, as these printers do not support the CMY color model. The DeskJet 500C and 550C models can only generate color screen dumps with the CCMY option.
 
COMPRESS. The COMPRESS option specifies that the printer being used can do "packbits"-style data compression. If this option is specified, the screen dump is transmitted to the printer using fewer data bytes. The COMPRESS option can be used with all the LaserJet IIP and IIP+ printers, all LaserJet III and IV series printers, all DeskJet series printers, the PaintJet XL300 printer (but not the older PaintJets), and the DesignJet printers, as well as other brands of printers that emulate these. Note, however, that the printers with slower CPU's will print 2-4 times slower when printing compressed data, so COMPRESS may not be a good option to use with these printers.
 
DPInnn. This option tells the driver to use nnn dots per inch when dumping graphics. Without this option, the printer's default resolution is used. This option is required for the GRAY option, explained below, and for the ADJUST option. The resolution specified must be one acceptable by the printer's Raster Graphics Resolution command. For most devices, DPI75, DPI100, DPI150, and DPI300 are the legal values for this option.
 
With the COLOR and BW options, this option controls the size of the dump, by mapping each pixel on the screen to one of the specified-sized dots on the printer; with the GRAY option, this options controls the size of the sub-pixels used to create the printed image, as explained in the GRAY option section. On the PC, this option also sets the size of the sub-pixels used to print the image when the ADJUST option is used, as explained in the ADJUST option section.
 
GRAY. The GRAY option causes the driver to consult the screen's color map and calculate a gray shade for each color using the NTSC grayscale equation. Screen dumps are produced using the resulting shades of gray. If the INVERT option is not also specified, white and black are reversed after the gray shade is calculated, so that lighter colors on the screen become darker colors on the printer.
 
When dumps are made using this option, the driver calculates the number of printer pixels, as specified in the DPInnn option, required to print a single screen pixel to make a 9 x 6 3/4 inch (23 x 17 mm) plot, up to 4 x 4 printer pixels per screen pixel. The driver sets the appropriate number of printer pixels to black to represent the gray shade of the corresponding screen pixel.
 
The NTSC grayscale equation is
 
brightness = 11% blue + 59% green + 30% red
 
The GRAY option is ignored unless the DPInnn option is also specified.
 
INVERT. By default, the driver makes images with black and white exchanged from the values used on the screen. If the GRAY option is used, the driver by default reverses the gray level of all pixels dumped from that seen on the display. This is often suitable for output to a printer, where printing is done with colored inks on white paper, but may not be suitable for film output devices, where an exact image of the screen is wanted. The INVERT option causes the colors or gray levels to be dumped exactly as they are on the screen.
 
RELATIVE. Normally, the driver begins each dump at the left margin. The RELATIVE option causes the driver to begin each dump at the printers current print position.
 
EJECT. Normally, the driver ejects the page after a dump is finished. The EJECT option is no longer supported. Use CONTROL ISC,113;0 to disable the auto-eject, and CONTROL ISC,113;1 to re-enable it.
 
APPEND
If the APPEND keyword is used with the DUMP DEVICE IS command and if the dump device is a file, the driver appends dumps to the file, separated by form feeds.
 
ALPHA Dumps
The DUMP ALPHA command from a PC text screen produces a dump at the top of a US "A" or European A4 sized sheet of paper. The attributes of text on the screen, such as the reversed colors on the key labels, are lost in this mode.
 
Note that DUMP ALPHA from bitmapped screens on the PC dumps the text on the screen as graphics, and attributes are preserved in the dump.
 
If the APPEND keyword is used, subsequent DUMP ALPHA commands produce similar dumps, each on a separate sheet of paper.
 
PS-DUMP Driver
The PostScript dump driver provides support for devices and software that accept the PostScript graphics language. It provides support for both the DUMP ALPHA and DUMP GRAPHICS commands. The PostScript dump driver produces a screen image intended to be rendered on a US "A" size or European A4 size page. It scales the image so that its longest dimension fits in the shortest dimension of the paper with an adequate margin. When the EXPANDED keyword is used on the DUMP DEVICE IS statement, screen dumps change from their normal portrait orientation to landscape orientation.
The PostScript dump driver is loaded with the following statement:
 
CONFIGURE DUMP TO "PS-DUMP[;options]"
 
Options
The options are listed after the semicolon in the driver name, within the quotes. If more than one option is specified, the option names are separated by commas. The GREY and COLOR options are ignored in ALPHA dumps. The options are as follows:
 
BW. This option causes the driver to dump using the paper color for the areas on the screen that were drawn using pen 0 and the ink color (usually black) for the areas on the screen drawn with any other pen. This is reversed if the INVERT option is also used. The BW option need not be specified explicitly; it is the default.
 
GRAY. This option causes the driver to render colors on the computer screen as shades of gray on the printer. Each shade of gray is calculated using the NTSC grayscale equation:
 
brightness = 11% blue + 59% green + 30% red
 
Unless the INVERT option is used, the resulting brightness is inverted before printing, so that dark colors on the computer screen print as light colors and vice-versa.
 
COLOR. The COLOR option causes the driver to output a color image of the screen. The resulting PostScript screen image can only be rendered on a device that supports Level 2 PostScript or the color extensions of Level 1.
 
INVERT. By default, the driver makes images with black and white exchanged from the values used on the screen. If the GRAY option is used, the driver by default reverses the gray level of all pixels dumped from that seen on the display. This is often suitable for output to a printer, where printing is done with colored inks on white paper, but may not be suitable for film output devices, where an exact image of the screen is wanted. The INVERT option causes the colors or gray levels to be dumped exactly as they are on the screen.
 
ADJUST. Certain display adapters use pixels that have different sizes in the horizontal and vertical directions. Without the ADJUST option, the driver dumps from these adapters using square pixels. This may result in an image that is too wide for its height. The ADJUST option forces the image to have a 4:3 aspect ratio regardless of its pixel size.
 
The APPEND Keyword
If the APPEND keyword is used in the DUMP DEVICE IS statement, the dump driver appends all dump images after the first one to the existing file as new pages. The driver inserts "%%Page" comments, used by some print spooling software, into the file at the beginning of each page. If the dumps are done in separate HTBasic sessions, the driver doesn't know which page it is on, so it starts over with page 1. This may be a problem with some spooling software. Also note that only one page can be present in a file that will be imported into a word processor document.
 
GIF Driver
The GIF dump driver provides support for software that accepts CompuServe Graphics Interchange Format (GIF) files. The DUMP ALPHA command dumps the alpha planes in graphics mode and the DUMP GRAPHICS command dumps the graphics planes.
 
When the EXPANDED keyword is used on the DUMP DEVICE IS statement, graphics screen dumps are rotated 90 degrees clockwise from their normal orientation.
 
The GIF dump driver is loaded with the following statement:
 
CONFIGURE DUMP TO "GIF[;options]"
 
Options
The options are listed after the semicolon in the driver name, within the quotes. If more than one option is specified, the option names are separated by commas. The BW option is ignored in ALPHA dumps. The options are as follows:
 
BW. The driver normally produces a 16- or 256-color screen dump when used with a color screen. The BW option causes the driver to produce a black-and-white screen dump with color screens. In this dump, pixels of color zero are dumped as black and pixels of any other color are dumped as white. (This is reversed if the INVERT option is also specified.)
 
INVERT. The driver normally dumps an image in the colors shown on the screen. The INVERT option causes the driver to reverse black and white in the dump. All other colors are unchanged.
 
The APPEND Keyword
If the APPEND keyword is used in the DUMP DEVICE IS statement, the GIF dump driver appends all dump images after the first one to the existing file. Note, however, that the screen type and colormap are stored when the first image is dumped. If the screen type or colormap changes, the dump images after the first one will not be correct. Also note that most software that uses the GIF format cannot process multiple images in one file.
 
WIN-DUMP Driver
The WIN-DUMP dump driver provides support for any printer supported by Windows that accepts bitmaps. The command to load the WIN-DUMP dump driver is:
 
CONFIGURE DUMP TO "WIN-DUMP[;options]"
 
If a DUMP is made before doing a CONFIGURE DUMP, HTBasic automatically loads and uses the WIN-DUMP driver.
 
Print Manager
The default interface select code (ISC) for DUMP DEVICE IS is 10, the WIN-PRINT interface. The WIN-DUMP driver can send dumps to any ISC that is assigned to a WIN-PRINT printer via Device Setup. If you change the DUMP DEVICE to any other interface, error 150 occurs when a DUMP is attempted. To send screen dumps to another interface, such as an IEEE-488 printer, use a different dump driver.
 
Because Windows is a multitasking environment in which several programs may try to print at once, Print Manager collects printer output into "jobs." Only when a job is done is it printed. Normally, the WIN-DUMP driver prints a single dump per print job. To mix text and screen dumps or multiple screen dumps on a single page, output some text to the page before doing the dump. For example,
 
CONTROL 10,113;0  ! set DUMP auto eject to off
ASSIGN @I TO 10
OUTPUT @I;"This is a  screen dump:"
OUTPUT @I
DUMP GRAPHICS
ASSIGN @I TO *
END
 
The various settings, such as margins and line height, made in the WIN-PRINT driver are honored by the WIN-DUMP driver. See the WIN-PRINT driver documentation in the Getting Started Guide for more information.
 
The EXPANDED keyword in the DUMP statement is ignored. The DUMP is made in landscape or portrait mode depending on the printer settings, as explained in Dump Graphics.
 
DUMP Size
By default, the screen image is scaled until it fills 100% of the width between the left and right margins. The size can be changed using GESCAPE code 39. This example sets the scaling to 20% of the width between the margins:
 
INTEGER S(1:1)
S(1)=20
GESCAPE CRT,39,S(*)
END
 
INVERT Option
By default, the driver inverts all colors in the image. Black and white are exchanged as well as other colors. This is often suitable for output to a black and white printer, where printing is done with black ink on white paper, but may not be suitable for color output devices, where an exact image of the screen is wanted. The INVERT option causes the colors or gray levels to be dumped exactly as they are on the screen.
 
Graphics Buffering
The DUMP statement is affected by graphics buffering. When graphics buffering is off, parts of a window that are obscured or off the edge of the screen are not dumped correctly. If the window is minimized, a dump of the icon is returned. When graphics buffering is on, the window is correctly dumped in all cases.
 
See Also: