From 7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 17 Oct 2008 06:10:33 +0000 Subject: First commit - moving from LuaForge to SourceForge --- html/en/drv/ps.html | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 html/en/drv/ps.html (limited to 'html/en/drv/ps.html') diff --git a/html/en/drv/ps.html b/html/en/drv/ps.html new file mode 100644 index 0000000..7a2dc1a --- /dev/null +++ b/html/en/drv/ps.html @@ -0,0 +1,208 @@ + + + + + + +CD_PS + + + + + +

CD_PS - PostScript Driver (cdps.h)

+ +

This drivers allows generating a PostScript file. This format was created to be a high-quality graphics language + for printers and is currently supported by several printers. If your printer supports PostScript, you can send the + file generated by the driver directly to the printer port. Usually, the filename has an extension .PS or .EPS. The + driver generates level-2 PostScript, therefore some PostScript viewers might present errors. The format's copyrights + are property of Adobe Systems.

+ +

Use

+ +

The file is created and opened by calling function + cdCreateCanvas(CD_PS, + Data), in which Data contains the filename and canvas dimensions. This function + opens the file and writes its header. Then, other functions in the CD library can be called as usual. The + Data parameter string has the following format:

+ +
"filename -p[paper] -w[width] -h[height] -l[left] -r[right] -b[bottom] -t[top] -s[resolution] [-e] [-g] [-o] [-1] d[margin]"
+
or in C
+"%s -p%d -w%g -h%g -l%g -r%g -b%g -t%g -s%d -e -o -1 -g -d%g"
+ +

The filename must be inside double quotes (") if it has spaces. Any amount of such canvases may exist + simultaneously. It is important to note that a call to function + + cdKillCanvas is required to close the file properly.

+

Paper Size - The default paper size is A4. It is possible to change it by using one of the predefined sizes + - CD_A0, CD_A1, CD_A2, CD_A3, + CD_A4, CD_A5, CD_LETTER and + CD_LEGAL - with parameter "-p". It is also possible to define a paper in a + particular size by using parameters "-w" e "-h". Values are + provided in millimeters.

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Default Paper Sizes
 Width (mm)Length (mm)
A08411187
A1594841
A2420594
A3297420
A4210297
A5148210
Letter216279
Legal216356
+
+
+ +

Margins - The margins are controlled by parameters "-l" "-r" + "-t" and "-b" (left, right, top, bottom). Values are + provided in millimeters. Default margins are 25.4 mm to all parameters. You can draw only inside the margins.

+

Resolution - Resolution is used to convert values from millimeters to pixels (the same as points, but the + number of points is per inch - DPI). Use parameter "-s" to configure the resolution. The + default value is 300 DPI.

+

Orientation - The page can be oriented as portrait or landscape. The default value is portrait, but when the + parameter "-o" is used, the horizontal and vertical values are switched.

+

EPS - The PostScript file can be in an Encapsulated PostScript format. For such, + simply specify the parameter "-e". It is useful for other applications to import the + PostScript file. You can define the margins of the bounding box by means of parameter "-d", + in millimeters.

+

Debug - Parameter "-g" adds a series of comments to the PS file, making the + beginning and end of a command from the CD library explicit. It is useful only for those who understand PostScript and + wish to identify a problem. It considerably increases the file size.

+

Level 1 - Parameter "-1" forces the driver to generate a level-1 PostScript. In + this case, pattern, stipple and hatch are not supported.

+

Pages - Use function cdFlush to change to a new page. The previous page will not + be changed.

+ +

Behavior of Functions

+

Control

+ +

Coordinate System & Clipping

+ +

Attributes

+ +

Colors

+ +

Client Images

+ +

Primitives

+ +

Server Images

+ +

Exclusive Attributes

+ + + + + + + -- cgit v1.2.3