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/pdf.html | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 html/en/drv/pdf.html (limited to 'html/en/drv/pdf.html') diff --git a/html/en/drv/pdf.html b/html/en/drv/pdf.html new file mode 100644 index 0000000..71ee6b7 --- /dev/null +++ b/html/en/drv/pdf.html @@ -0,0 +1,227 @@ + + + + + + +CD_PDF + + + + + +

CD_PDF - PDF Driver (cdpdf.h)

+ +

This drivers allows generating a PDF file. This format developed for representing documents in a manner that is + independent of the original application software, hardware, and operating system used to create those documents. The + format's copyrights are property of Adobe Systems.

+

This driver is very similar to the PS driver but it uses the PDFlib library to generate the PDF (http://www.pdflib.com/). + There are two PDFlib licenses available, one commercial and one free with a flexible license, see + PDFlib Lite License. The CD_PDF driver works with both + versions.

+

By default the pre-compiled library in the distribution uses the PDF Lite version code. The configuration of the PDF Lite code +included does not supports image + file formats. The current PDF Lite version is 7.0.2.

+

PDFlib Copyright (c) 1997-2007 Thomas Merz and PDFlib GmbH. All rights reserved. Applications that use this driver + are subject to the PDFlib GmbH License Agreement.

+ +

Use

+ +

The file is created and opened by calling function + cdCreateCanvas(CD_PDF, + 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] -s[resolution] [-o]"
+or in C
+"%s -p%d -w%g -h%g -s%d -o"
+ +

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.

+ + + +

To use this driver, the application must be linked with the "cdpdf" + and "pdflib" libraries.

+

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
+
+
+ +

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.

+

In Lua, it is necessary to call function cdluapdf_open() after a call + to function cdlua_open(), apart from linkediting with the "cdluapdf" + library.

+ +

Behavior of Functions

+

Control

+ +

Coordinate System & Clipping

+ +

Attributes

+ +
Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique,
+Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique,
+Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic,
+Symbol, 
+ZapfDingbats
+

Colors

+ +

Client Images

+ +

Primitives

+ +

Server Images

+ +

Exclusive Attributes

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