16. Printing a drawing on a printer

AlfaCAD allows you to print drawings using any graphics printer or raster plotter compatible with Windows via an appropriate driver.

An alternative to printing on a printer is to save the drawing in one of the commonly used graphic file formats:

Depending on the print / save mode (color, grayscale or black and white), image files are saved with a 24 or 8-bit color palette.

Print direction

AlfaCAD allows you to print in normal, rotated (90 °) or inverted (180 °) direction, as well as mirrored (for printing on transparent films).

Scale and positioning on the print page

A printout or saving in a graphic file format can be realized in a given scale or in a compression mode.
The scale factor may be selected arbitrarily as an actual value greater or less than 1.0.
When printing to a printer, the page size of the printout is determined by the page setting in the printer driver.
When saving to a graphic file, the parameters of the print page in the print dialog box are taken into account, including:

- print page width [mm]
- print page height [mm]
- left, right, top and bottom margins
- overlap
- initial print page number
- actual drawing dimensions
for a one-page (file) saving

Some of those parameters are also taken into account while printing on the printer (margins and overlap)

Print "window" and "sheet"

If the "Window" option is not selected, the entire drawing will be printed. In AlfaCAD, each drawing has a declared sheet format. In many CAD programs, the sheet format is not defined, and printing usually requires marking the area to be printed. Such a "virtual" drawing allows you to compose a drawing in a flexible manner, leaving room for auxiliary construction of blocks used in a significant part of the sheet, but usually relieves the designer from the discipline of such a drawing composition that does not pose problems in the final printout of the drawing, where there is always a limit to the size of the print page, except when the printout can be printed in a multi-page form without detriment to the quality of the project. However, this is not commonly practiced. Therefore, if we have a printer or plotter with the maximum print size of A0, also the drawing format should not exceed the size of this format, if the drawing should be printed in the correct scale. When editing a drawing in AlfaCAD, the drawing format can always be changed but should not exceed the maximum format limited by the size of the printing device. In the case of electrical diagrams and other drawings in which the sheet format is described by sectors, the need to declare the drawing sheet format becomes of additional importance. In AlfaCAD, the drawing "grows" from the origin of the global coordinate system, which always lies in the lower left corner of the sheet. When the sheet size is modified, also the description of sectors is automatically changed, always with the starting point thus also the first sector number remains unchanged, except for the reversed numbering (where the first sector number is assigned to the rightmost sector).

If the "Window" option is selected, the program requires that the area to be printed be selected by marking the window frame before printing. Only this area will be printed and all objects will be "trimmed" to the given window borders.

If additionally the "Sheet" option is selected, the program waits for the selection of so-called "Sheet", which is a special block, created only for the purposes of printing, containing the drawing frame, printout borders, and other elements, e.g. a drawing title block, additional drawing descriptions, logos, etc. Each drawing can contain many printout sheets, each of them prepared to print another part of the drawing. You can imagine a large pipeline network drawing based on a terrain map, either in vector form or scanned as a raster image. If there is a need to print only a fragment of such a drawing, especially many fragments, it is convenient to use the printout sheets. Each sheet can be placed at any angle, but the sheet will be printed in such a way that that the edges of the sheet will be parallel to the boundaries of the printer's page. This method allows for the optimal printing of the map, where the direction of the sides of the world (North) is only symbolically marked, without the need to orient the print in accordance with the directions of the world.

A print sheet is simply a rectangular block with the name of the type @SHEET enclosing the outer box of lines forming a rectangle, forming an inner block named as *FORMAT , then another lines forming a rectangle as an inner block named *PAGE , which is treated as print boundaries, and additionally other elements as needed, in the form of primitives and blocks, constituting the content of the @SHEET block.

Creating a print sheet is easy. Draw a rectangle as a frame, no larger than the page size of the printer's printout, and then group the lines into a block with a name of type *FORMAT. In the same way, the inner frame should be drawn, keeping the required distance from the format frame, and the lines should be grouped into a block with a name of type *PAGE. Other elements, such as the title block, descriptions, should be placed either between the format frame and the sheet frame, or inside the sheet, while avoiding collisions between drawing elements and print sheet elements. All objects placed outside the *PAGE boundaries will not collide with the drawing elements, because the drawing is cut to the edges of *PAGE block.

The sheet block does not have to be created every time. It can be a block saved in a file and inserted into any drawing. Each drawing can contain multiple sheet blocks, and they can be placed any way you like, including overlapping each other if needed. Each sheet block can be of different sizes, depending on the needs and printing possibilities. Only the sheet indicated before printing will be printed, the remaining sheets will be ignored (invisible) during printing, regardless of their content, if all elements of such a block are the content of the @SHEET block.

If the drawing contains printout sheets, but the printout is carried out without the "Sheet" option, or as the entire drawing or its fragment in the "Window" option, all sheet blocks are ignored while printing (invisible).

Type of printout

AlfaCAD offers printing to a printer or saving to a graphic file.
The print quality of the printer depends on the setting in the printer driver.
The quality of saving a graphic file (resolution in dots per inch, "dpi") depends on the choice of options:
Draft, Better, Good, Fine, Extra fine .
The meaning of each option depends on the parameter settings in the [Printer-Image] group of the ALFACAD.INI configuration file, for example :

Draft Density = 75
Better Density = 150
Good Density = 300
Fine Density = 600
Extra Fine Density = 1200

Density is expressed in dots per inch (dpi) on both horizontal and vertical axes

An additional parameter for saving a drawing to a graphic file is the file format:

In the case of exceptionally large resulting image files, it is recommended to choose the BMP format, e.g. for further conversion to another type of file using other graphics programs. AlfaCAD allows you to save in one of the available file formats of considerable size, but this function is limited by the program resources, and in fact the resources of an additional process launched for the purpose of converting an image created internally in the BMP format. BMP files in AlfaCAD can reach the size of several GB, which, however, may exceed the conversion capabilities in the image conversion process. In this case, an error is signaled, which does not mean, however, that such a file can be converted to other formats using specialized programs dedicated to editing or converting graphic files.

If the graphic file is saved as a single sheet (the adopted page sizes in a given print / save scale, expressed in [mm], are not smaller than the resulting image sizes in a given resolution, or the "actual size" option is selected, where the page size is selected automatically, a single file with the specified name is saved.

If the image does not fit on one page, a set of files with the given name and additional files and names with the suffix 00x are saved, where x is a sequential number starting with 1, creating a mosaic covering the entire format of the saved image of the drawing. The left, right, top and bottom margins are taken into account, as well as the overlap of individual mosaic panels, which facilitate printing and possible gluing of the printed tiles of the entire sheet.

Line thickness

Each line, polyline, arc, circle, Bezier curve, line segment objects such as 2- and 3-lines, ellipses, charts, sketches, as well as polygons, areas and unfilled traces, have the attribute of the line thickness shown on the screen in “symbolic” form, due to the necessary simplification of displaying drawing elements in a limited resolution. However, the line thickness parameter takes on real significance when printing a drawing and saving the drawing image as a graphic file. This is the purpose of the parameter block describing the line thickness expressed in [mm], related to the print scale 1.0. In a different scale, the line thicknesses are appropriately modified in accordance with a given scale.

The configuration consists of 5 line widths ranging from thinnest to thickest.

Line thickness factors for prints on printers with anisotropic resolution

In the case of printing on a printer with a significant difference in resolution in the horizontal and vertical directions, in order to obtain a more faithful reproduction of the line thickness on the printout, it may be necessary to slightly adjust the thickness in each of the directions, horizontal and vertical. For this purpose, the H and V factors are used in the form of real numbers greater than 0.0, eg H = 1.0, V = 1.2. The only way to correctly select the coefficients, if necessary, is to visually assess the printout of lines drawn at an angle of 0 and 90º.

Print preview

When printing the entire drawing in a given scale, the print preview allows you to assess whether the drawing fits on the print page with a given size, or somehow the drawing will be covered with a mosaic of sheets with given sizes, including margins and overlaps.

The preview facilitates the appropriate setting of print parameters, and the resumption of the printout starting from the given page number, in case of a previous interruption of the printout.

Saving and loading printing parameters

When printing drawings of different sizes and using different printers, it may be useful tto save a specific configuration and restore it when needed again. Saving the configuration in files with the .kdr extension does not impose restrictions on their number, which allows for convenient use of multiple configurations depending on the size of the drawing format and the currently used printer.