PurePDF library

Overview

PurePDF Purebasic UserLibrary Version 2.08 (c) Lucky Luke

Enhancements by ABBKlaus using Adobe PDF-Reference V1.6

The PurePDF user library based upon the FPDF class contains
PureBasic functions to create PDF files.

This library is provided as freeware. It may be used freely for any purpose, personal or commercial. A credit in your application would be appreciated.
This library is written in PureBasic, built with Tailbite and distributed by Library Installer.
Help created with PureHELP Maker.

Information about changes can be found here

Command Index

pdf_AcceptPageBreak
pdf_Addlink
pdf_AddPage
pdf_AliasNbPages
pdf_ASCII85_Decode
pdf_ASCII85_Encode
pdf_ASCII85_Free
pdf_BookMark
pdf_Cell
pdf_Circle
pdf_Create
pdf_DisplayPreferences
pdf_Ellipse
pdf_EmbedFile
pdf_GetCMargin
pdf_GetErrorCode
pdf_GetErrorMessage
pdf_GetFontSize
pdf_GetFontSizePt
pdf_GetH
pdf_GetK
pdf_GetLMargin
pdf_GetMultiCellNewLines
pdf_GetN
pdf_GetNumbering
pdf_GetNumberingFooter
pdf_GetPageNo
pdf_GetRMargin
pdf_GetStringWidth
pdf_GetW
pdf_GetWs
pdf_GetX
pdf_GetY
pdf_Image
pdf_ImageMem
pdf_IncludeFileJS
pdf_IncludeJS
pdf_InsertTOC
pdf_Line
pdf_Link
pdf_Ln
pdf_MirrorH
pdf_MirrorV
pdf_MultiCell
pdf_MultiCellBlt
pdf_NumPageNum
pdf_PathArc
pdf_PathBegin
pdf_PathEnd
pdf_PathLine
pdf_PathRect
pdf_Rect
pdf_ResetBookMark
pdf_Rotate
pdf_RoundRect
pdf_Save
pdf_ScaleX
pdf_ScaleXY
pdf_ScaleY
pdf_Sector
pdf_SetAFile
pdf_SetALaunch
pdf_SetAPopUp
pdf_SetAText
pdf_SetAuthor
pdf_SetAutoPageBreak
pdf_SetCellMargin
pdf_SetCreator
pdf_SetDash
pdf_SetDisplayMode
pdf_SetDrawColor
pdf_SetDrawColorCMYK
pdf_SetFillColor
pdf_SetFillColorCMYK
pdf_SetFont
pdf_SetFontSize
pdf_SetKeywords
pdf_SetLeftMargin
pdf_SetLineCap
pdf_SetLineJoin
pdf_SetLineWidth
pdf_SetLink
pdf_SetMargins
pdf_SetNumberingFooter
pdf_SetProcAcceptPageBreak
pdf_SetProcCompression
pdf_SetProcFooter
pdf_SetProcHeader
pdf_SetRightMargin
pdf_SetSubject
pdf_SetTextColor
pdf_SetTextColorCMYK
pdf_SetTitle
pdf_SetTopMargin
pdf_SetWs
pdf_SetX
pdf_SetXY
pdf_SetY
pdf_Skew
pdf_SkewX
pdf_SkewY
pdf_StartPageNums
pdf_StartTransform
pdf_StopPageNums
pdf_StopTransform
pdf_SubWrite
pdf_TOCEntry
pdf_Text
pdf_TextString
pdf_Translate
pdf_TranslateX
pdf_TranslateY
pdf_TruncateCell
pdf_Triangle
pdf_Write


pdf_AcceptPageBreak()

Syntax

pdf_AcceptPageBreak()

Description

Whenever a page break condition is met, the method is called, and the break is issued or not
depending on the returned value. The default implementation returns a value according to the
mode selected by pdf_SetAutoPageBreak().

It is possible to create your own page break routine using pdf_SetAcceptPageBreak(). This
method is called automatically and should not be called directly by the application.

PurePDF - index


pdf_Addlink()

Syntax

pdf_Addlink()

Description

Creates a new internal link and returns its identifier.


pdf_AddPage()

Syntax

pdf_AddPage([Orientation$ [, Format$]])

Description

Adds a new page to the document. If a page is already present, the method set by
pdf_SetProcFooter() is called first to output the footer. Then the page is added, the current
position set to the top-left corner according to the left and top margins, and the method set by
pdf_SetProcHeader() is called to display the header.

The font which was set before calling is automatically restored. There is no need to call
pdf_SetFont() again if you want to continue with the same font. The same is true for colors and
line width.

The origin of the coordinate system is at the top-left corner and increasing ordinates go
downwards.

Orientation$
Page orientation. Possible values are (case insensitive):
- P or Portrait
- L or Landscape
The default is the one passed to pdf_Create().

Format$
The format used for pages. It can be either one of the following values:
- #PDF_PAGE_FORMAT_4A0
- #PDF_PAGE_FORMAT_2A0
- #PDF_PAGE_FORMAT_A0
- #PDF_PAGE_FORMAT_A1
- #PDF_PAGE_FORMAT_A2
- #PDF_PAGE_FORMAT_A3
- #PDF_PAGE_FORMAT_A4
- #PDF_PAGE_FORMAT_A5
- #PDF_PAGE_FORMAT_A6
- #PDF_PAGE_FORMAT_A7
- #PDF_PAGE_FORMAT_A8
- #PDF_PAGE_FORMAT_A9
- #PDF_PAGE_FORMAT_A10
- #PDF_PAGE_FORMAT_B0
- #PDF_PAGE_FORMAT_B1
- #PDF_PAGE_FORMAT_B2
- #PDF_PAGE_FORMAT_B3
- #PDF_PAGE_FORMAT_B4
- #PDF_PAGE_FORMAT_B5
- #PDF_PAGE_FORMAT_B6
- #PDF_PAGE_FORMAT_B7
- #PDF_PAGE_FORMAT_B8
- #PDF_PAGE_FORMAT_B9
- #PDF_PAGE_FORMAT_B10
- #PDF_PAGE_FORMAT_C0
- #PDF_PAGE_FORMAT_C1
- #PDF_PAGE_FORMAT_C2
- #PDF_PAGE_FORMAT_C3
- #PDF_PAGE_FORMAT_C4
- #PDF_PAGE_FORMAT_C5
- #PDF_PAGE_FORMAT_C6
- #PDF_PAGE_FORMAT_C7
- #PDF_PAGE_FORMAT_C8
- #PDF_PAGE_FORMAT_C9
- #PDF_PAGE_FORMAT_C10
- #PDF_PAGE_FORMAT_RA0
- #PDF_PAGE_FORMAT_RA1
- #PDF_PAGE_FORMAT_RA2
- #PDF_PAGE_FORMAT_RA3
- #PDF_PAGE_FORMAT_RA4
- #PDF_PAGE_FORMAT_SRA0
- #PDF_PAGE_FORMAT_SRA1
- #PDF_PAGE_FORMAT_SRA2
- #PDF_PAGE_FORMAT_SRA3
- #PDF_PAGE_FORMAT_SRA4
- #PDF_PAGE_FORMAT_LETTER
- #PDF_PAGE_FORMAT_LEGAL
- #PDF_PAGE_FORMAT_EXECUTIVE
- #PDF_PAGE_FORMAT_FOLIO


pdf_AliasNbPages()

Syntax

pdf_AliasNbPages([Alias$])

Description

Defines an alias for the total number of pages. It will be substituted as the document is closed.

Alias$
The alias. Default value: {nb}.


pdf_ASCII85_Decode()

Syntax

pdf_ASCII85_Decode(*InputBuffer,InputLength,*OutputBuffer,*OutputLength)

Description

Decodes an ASCII85 encoded buffer.

*InputBuffer
Pointer to input buffer

InputLength
The length of the input buffer

*OutputBuffer
Pointer to output buffer

*OutoutLength
Pointer to a variable that holds the length of the output buffer.
On successfull decode the decoded length is written.


pdf_ASCII85_Encode()

Syntax

pdf_ASCII85_Encode(*aData.MEM_DataStructure [, WidthP.l])

Description

Encodes data to ASCII85.

*aData.MEM_DataStructure
pData.l = pointer to databuffer
lMaxSize.l = length of databuffer
lCurSize.l = no used

WidthP.l
The width of a ASCII85 encoded line

On success the pointer *aData returns the new databuffer.
pData.l = pointer to databuffer
lMaxSize.l = length of databuffer
lCurSize.l = size of ASCII85 encoded buffer

Hint : The Databuffer must be cleared with pdf_ASCII85_Free()


pdf_ASCII85_Free()

Syntax

pdf_ASCII85_Free(*aData.MEM_DataStructure)

Description

Frees a Databuffer that was allocated with pdf_ASCII85_Encode().

*aData.MEM_DataStructure
pData.l = pointer to databuffer / is set to 0 on return
lMaxSize.l = ignored
lCurSize.l = ignored


pdf_BookMark()

Syntax

pdf_BookMark(Text$ [, Level.l [, Y.f]])

Description

Adds a bookmark.

Text$
the bookmark title.

Level
the bookmark level (0 is top level, 1 is just below, and so on).

Y
the Y position of the bookmark destination in the current page.
-1 means the current position. Default value : 0


pdf_Cell()

Syntax

pdf_Cell(W.f [, H.f [, Text$ [, Border.l [, Ln.f [, Align$ [, Fill.l [, Link.l]]]]]]])

Description

Prints a cell (rectangular area) with optional borders, background color and character string. The
upper-left corner of the cell corresponds to the current position. The text can be aligned or
centered. After the call, the current position moves to the right or to the next line. It is possible to
put a link on the text.

If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done
before outputting.

W
Cell width. If 0, the cell extends up to the right margin.

H
Cell height. Default value :0.

Text$
String to print. Default value: empty string.

Border
Indicates if borders must be drawn around the cell. The value can be:
- 0: no border
- 1: frame
or the sum of the following constants:
- #PDF_CELL_LEFTBORDER
- #PDF_CELL_TOPBORDER
- #PDF_CELL_RIGHTBORDER
- #PDF_CELL_BOTTOMBORDER
Default value: 0.

Ln
Indicates where the current position should go after the call. Possible values are:
- 0: to the right
- 1: to the beginning of the next line
- 2: below
Putting 1 is equivalent to putting 0 and calling pdf_Ln() just after. Default value: 0.

Align$
Allows to center or align the text. Possible values are:
- #PDF_ALIGN_RIGHT
- #PDF_ALIGN_LEFT
- #PDF_ALIGN_FORCEDJUSTIFIED
- #PDF_ALIGN_JUSTIFIED
- #PDF_ALIGN_CENTER

Fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.

Link
Identifier returned by pdf_AddLink().


pdf_Circle()

Syntax

pdf_Circle(X.f, Y.f, R.f [, Style$])

Description

Draw circle.

X
Abscissa of center.

Y
Ordinate of center.

R
Radius.

Style$
Style of rendering, like for pdf_Rect().
- #PDF_STYLE_DRAW (DEFAULT)
- #PDF_STYLE_FILL
- #PDF_STYLE_DRAWANDFILL


pdf_Create()

Syntax

pdf_Create([Orientation$ [, Unit$ [, Format$]]])

Description

This method begins the generation of the PDF document. It is necessary to call it explicitly. Note:
no page is created by this method.

Orientation$
Default page orientation. Possible values are (case insensitive):
- P or Portrait
- L or Landscape
Default value is P.

Unit$
User measure unit. Possible values are:
- pt: point
- mm: millimeter
- cm: centimeters
- in: inch
A point equals 1/72 of inch, that is to say 0.35 mm (an inch being 2.54 cm). This is a very
common unit in typography, font sizes are expressed in that unit.
Default value is mm.

Format$
The format used for pages. It can be either one of the following values:
- #PDF_PAGE_FORMAT_4A0
- #PDF_PAGE_FORMAT_2A0
- #PDF_PAGE_FORMAT_A0
- #PDF_PAGE_FORMAT_A1
- #PDF_PAGE_FORMAT_A2
- #PDF_PAGE_FORMAT_A3
- #PDF_PAGE_FORMAT_A4
- #PDF_PAGE_FORMAT_A5
- #PDF_PAGE_FORMAT_A6
- #PDF_PAGE_FORMAT_A7
- #PDF_PAGE_FORMAT_A8
- #PDF_PAGE_FORMAT_A9
- #PDF_PAGE_FORMAT_A10
- #PDF_PAGE_FORMAT_B0
- #PDF_PAGE_FORMAT_B1
- #PDF_PAGE_FORMAT_B2
- #PDF_PAGE_FORMAT_B3
- #PDF_PAGE_FORMAT_B4
- #PDF_PAGE_FORMAT_B5
- #PDF_PAGE_FORMAT_B6
- #PDF_PAGE_FORMAT_B7
- #PDF_PAGE_FORMAT_B8
- #PDF_PAGE_FORMAT_B9
- #PDF_PAGE_FORMAT_B10
- #PDF_PAGE_FORMAT_C0
- #PDF_PAGE_FORMAT_C1
- #PDF_PAGE_FORMAT_C2
- #PDF_PAGE_FORMAT_C3
- #PDF_PAGE_FORMAT_C4
- #PDF_PAGE_FORMAT_C5
- #PDF_PAGE_FORMAT_C6
- #PDF_PAGE_FORMAT_C7
- #PDF_PAGE_FORMAT_C8
- #PDF_PAGE_FORMAT_C9
- #PDF_PAGE_FORMAT_C10
- #PDF_PAGE_FORMAT_RA0
- #PDF_PAGE_FORMAT_RA1
- #PDF_PAGE_FORMAT_RA2
- #PDF_PAGE_FORMAT_RA3
- #PDF_PAGE_FORMAT_RA4
- #PDF_PAGE_FORMAT_SRA0
- #PDF_PAGE_FORMAT_SRA1
- #PDF_PAGE_FORMAT_SRA2
- #PDF_PAGE_FORMAT_SRA3
- #PDF_PAGE_FORMAT_SRA4
- #PDF_PAGE_FORMAT_LETTER
- #PDF_PAGE_FORMAT_LEGAL
- #PDF_PAGE_FORMAT_EXECUTIVE
- #PDF_PAGE_FORMAT_FOLIO


pdf_DisplayPreferences()

Syntax

pdf_DisplayPreferences(Preferences$)

Description

Set some viewer preferences.

Preferences$
Available options are (case-sensitive) :
- FullScreen: displays the document full-screen (escape key to restore the normal view)
- HideMenubar: hides the menu - HideToolbar: hides all toolbars
- HideWindowUI: hides all window elements (scroll bars, navigation controls, bookmarks...)
- DisplayDocTitle: displays the title of the document instead of the file name (no effect inside web plug-in)
- CenterWindow: centers the window (no effect inside web plug-in)
- FitWindow: sizes the window (if it's not maximized) to fit the page (no effect inside web plug-in)


pdf_Ellipse()

Syntax

pdf_Ellipse(X.f, Y.f, Rx.f, Ry.f [, Style$])

Description

Draw ellipse.

X
Abscissa of center.

Y
Ordinate of center.

Rx
Horizontal radius.

Ry
Vertical radius.

Style$
Style of rendering, like for pdf_Rect().
- #PDF_STYLE_DRAW (DEFAULT)
- #PDF_STYLE_FILL
- #PDF_STYLE_DRAWANDFILL


pdf_EmbedFile()

Syntax

pdf_EmbedFile(Filename$ [, Description$])

Description

Embeds a file into the pdf.

Filename$
The filename.

Description$
Descriptive text associated with the file specification.


pdf_GetCMargin()

Syntax

pdf_GetCMargin()

Description

Get cell margin.


pdf_GetErrorCode()

Syntax

pdf_GetErrorCode()

Description

Returns the error code.

Possible values are:
- 1 = 16-bit depth PNG not supported.
- 2 = Alpha channel PNG not supported.
- 3 = Unknown compression PNG method.
- 4 = Unknown filter PNG method.
- 5 = Interlacing PNG not supported.
- 6 = Missing palette in PNG.
- 7 = This JPEG file is not supported
- 8 = Can't open image file
- 9 = Problem reading image file in memory
-10 = JFIF marker is missing "
-11 = Not a JPEG file."
-12 = Incorrect PNG file.
-13 = Not a JPEG or PNG file.
-14 = Filename is not correct.
-15 = Can't create the file.
-16 = File open error.
-17 = Out of memory.


pdf_GetErrorMessage()

Syntax

pdf_GetErrorMessage()

Description

Return the error message.


pdf_GetFontSize()

Syntax

pdf_GetFontSize()

Description

Get current fontsize in points.


pdf_GetFontSizePt()

Syntax

pdf_GetFontSizePt()

Description

Get current fontsize in points.


pdf_GetH()

Syntax

pdf_GetH()

Description

Get current height of page.


pdf_GetK()

Syntax

pdf_GetK()

Description

Get scale factor.


pdf_GetLMargin()

Syntax

pdf_GetLMargin()

Description

Get left margin.


pdf_GetMultiCellNewLines()

Syntax

pdf_GetMultiCellNewLines()

Description

Get number of newlines from previous call to pdf_MultiCell()


pdf_GetN()

Syntax

pdf_GetN()

Description

Get object number


pdf_GetNumbering()

Syntax

pdf_GetNumbering()

Description

Return if numbering is true/false. Usefull for TOC functions.

Example

Procedure footer()
   If pdf_GetNumberingFooter() = #False
      ProcedureReturn
   EndIf
   pdf_SetY(-15)
   pdf_SetFont("Arial","I",8)
   pdf_Cell(0,7,Str(pdf_NumPageNum()),0,0,#PDF_ALIGN_CENTER)
   If pdf_GetNumbering() = #False
      pdf_SetNumberingFooter(#False)
   EndIf
EndProcedure


pdf_GetNumberingFooter()

Syntax

pdf_GetNumberingFooter()

Description

Return if numbering in footer is true/false. Usefull for TOC functions.

Example

Procedure footer()
   If pdf_GetNumberingFooter() = #False
      ProcedureReturn
   EndIf
   pdf_SetY(-15)
   pdf_SetFont("Arial","I",8)
   pdf_Cell(0,7,Str(pdf_NumPageNum()),0,0,#PDF_ALIGN_CENTER)
   If pdf_GetNumbering() = #False
      pdf_SetNumberingFooter(#False)
   EndIf
EndProcedure


pdf_GetPageNo()

Syntax

pdf_GetPageNo()

Description

Returns the current page number.


pdf_GetRMargin()

Syntax

pdf_GetRMargin()

Description

Get right margin.


pdf_GetStringWidth()

Syntax

pdf_GetStringWidth(String$)

Description

Returns the length of a string in user unit. A font must be selected.

String$
The string whose length is to be computed.


pdf_GetW()

Syntax

pdf_GetW()

Description

Get current width of page.


pdf_GetWs()

Syntax

pdf_GetWs()

Description

Get word spacing.


pdf_GetX()

Syntax

pdf_GetX()

Description

Returns the abscissa of the current position.


pdf_GetY()

Syntax

pdf_GetY()

Description

Returns the ordinate of the current position.


pdf_Image()

Syntax

pdf_Image(FileName$, X.f, Y.f [, W.f [, H.f [, Link.l]]])

Description

Puts an image in the page. The upper-left corner must be given. The dimensions can be specified
in different ways:
- explicit width and height (expressed in user unit)
- one explicit dimension, the other being calculated automatically in order to keep the original
proportions
- no explicit dimensions, in which case the image is put at 72 dpi

Supported formats are PNG JPEG WMF.
For PNG, are allowed:
- gray scales on at most 8 buts (256 levels)
- indexed colors
- true colors (24 bits)
but are not supported:
- interlacing
- alpha channel

If a transparent color is defined, it will be taken into account (but will be only interpreted by
Acrobat 4 and above).

The format can be specified explicitly or inferred from the file extension. It is possible to put a
link on the image.
Remark: if an image is used several times, only one copy will be embedded in the file.

FileName$
Name of the file containing the image.

X
Abscissa of the upper-left corner.

Y
Ordinate of the upper-left corner.

W
Width of the image in the page. If not specified or equal to zero, it is calculated.

H
Height of the image in the page. If not specified or equal to zero, it is calculated.

Link
Identifier returned by pdf_AddLink().


pdf_ImageMem()

Syntax

pdf_ImageMem(Name$, *Mem, MemSize, X.f, Y.f [, W.f [, H.f [, Link.l]]])

Description

Puts an image in the page.

In general this is the same as pdf_Image(), except that it loads the image from memory.

Name$
Name of the file containing the image.

*Mem
Pointer to the memory buffer where the picture is located.

MemSize
The size of the memory buffer

X
Abscissa of the upper-left corner.

Y
Ordinate of the upper-left corner.

W
Width of the image in the page. If not specified or equal to zero, it is calculated.

H
Height of the image in the page. If not specified or equal to zero, it is calculated.

Link
Identifier returned by pdf_AddLink().


pdf_IncludeFileJS()

Syntax

pdf_IncludeFileJS(FileName.s)

Description

Embed some JavaScript inside the PDF. The code is executed on document opening.

Filename.s
The filename


pdf_IncludeJS()

Syntax

pdf_IncludeJS(Script$)

Description

Embed some JavaScript inside the PDF. The code is executed on document opening.


pdf_InsertTOC()

Syntax

pdf_InsertTOC([Location.l [, LabelSize.l [, EntrySize.l [, FontFamily$ [, Label$]]]]])

Description

Insert a table of contents anywhere in the document. Use pdf_TOCEntry() to add the entries,
then call this function to place the table at the page you want.

Location
The page where you want to put the table. Default: 1.

LabelSize
Size of the font for the label$. Default value: 20.

EntrySize
Size of the font for the entries. Default value: 10.

FontFamily$
Font family for the table. Default value: 'Times'.

Label$
The header of the table. Default: 'Table of contents'.


pdf_Line()

Syntax

pdf_Line(X1.f,Y1.f,X2.f,Y2.f)

Description

Draws a line between two points.

X1
Abscissa of first point.

Y1
Ordinate of first point.

X2
Abscissa of second point.

Y2
Ordinate of second point.


pdf_Link()

Syntax

pdf_Link(X.f, Y.f, W.f, H.f, Link.l)

Description

Puts a link on a rectangular area of the page. Text or image links are generally put via pdf_Cell(),
pdf_Write() or pdf_Image(), but this method can be useful for instance to define a clickable area
inside an image.

X
Abscissa of the upper-left corner of the rectangle.

Y
Ordinate of the upper-left corner of the rectangle.

W
Width of the rectangle.

H
Height of the rectangle.

Link
Identifier returned by pdf_AddLink().


pdf_Ln()

Syntax

pdf_Ln([Height.f])

Description

Performs a line break. The current abscissa goes back to the left margin and the ordinate
increases by the amount passed in parameter.

Height
The height of the break.
By default, the value equals the height of the last printed cell.


pdf_MirrorH()

Syntax

pdf_MirrorH([X.f])

Description

Alias for scaling -100% in x direction.

X
Abscissa of the axis of reflection.


pdf_MirrorV()

Syntax

pdf_MirrorV([Y.f])

Description

Alias for scaling -100% in y direction.

Y
Ordinate of the axis of reflection.


pdf_MultiCell()

Syntax

pdf_MultiCell(W.f, H.f, Text$ [, Border.l [, Align$ [, Fill.f [, Indent.f [, Maxline.l]]]]])

Description

This method allows printing text with line breaks. They can be automatic (as soon as the text
reaches the right border of the cell) or explicit. As many cells as necessary are output, one below
the other. Text can be aligned, centered or justified. The cell block can be framed and the
background painted.

W
Width of cells. If 0, they extend up to the right margin of the page.

H
Height of cells.

Text$
String to print.

Border
Indicates if borders must be drawn around the cell block. The value can be either a number:
- 0: no border
- 1: frame
or the sum of the following constants:
- #PDF_CELL_LEFTBORDER
- #PDF_CELL_TOPBORDER
- #PDF_CELL_RIGHTBORDER
- #PDF_CELL_BOTTOMBORDER
Default value: 0.

Align$
Sets the text alignment. Possible values are:
- #PDF_ALIGN_RIGHT
- #PDF_ALIGN_LEFT
- #PDF_ALIGN_FORCEDJUSTIFIED
- #PDF_ALIGN_JUSTIFIED (DEFAULT)
- #PDF_ALIGN_CENTER

Fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.

Indent
First line indented if indent > 0.

Maxline
When reaching this limit, the function returns the part of the string which was cut. This allows
to have multi-columns with variable width, or column break before end of page.


pdf_MultiCellBlt()

Syntax

pdf_MultiCellBlt(W.f, H.f, Blt$, Txt$ [, Border.f [, Align$ [, Fill.f]]])

Description

This method allows pdf_MultiCell output with a text bullet ahead of the first line. Text is indented to the right of the bullet.
Usage is the same as pdf_MultiCell except that there's an extra blt$ parameter for the text of the bullet.


pdf_NumPageNum()

Syntax

pdf_NumPageNum()

Description

Get TOC page number


pdf_PathArc()

Syntax

pdf_PathArc(x1.f, y1.f, x2.f, y2.f, x3.f, y3.f)

Description

Draws a cubic Bezier curve to the current path.
The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bezier control points.
The new current point is (x3, y3).


pdf_PathBegin()

Syntax

pdf_PathBegin(X.f,Y.f)

Description

Begins a new path at the coordinates (x, y).


pdf_PathEnd()

Syntax

pdf_PathEnd([Style$])

Description

Closes the current path and draws a line from the current point to the starting point.

Style$
Style of rendering, like for pdf_Rect().
- #PDF_STYLE_DRAW (DEFAULT)
- #PDF_STYLE_FILL
- #PDF_STYLE_DRAWANDFILL


pdf_PathLine()

Syntax

pdf_PathLine(X.f,Y.f)

Description

Draws a line from the current point to (x, y).
The new current point is (x, y).


pdf_PathRect()

Syntax

pdf_PathRect(x.f,y.f,w.f,h.f)

Description

Draws a rectangle to the current path with upper-left corner (x, y) and dimensions (w, h).


pdf_Rect()

Syntax

pdf_Rect(X.f, Y.f, W.f, H.f [, Style$])

Description

Outputs a rectangle. It can be drawn (border only), filled (with no border) or both.

X
Abscissa of upper-left corner.

Y
Ordinate of upper-left corner.

W
Width.

H
Height.

Style$
Style of rendering. Possible values are:
- #PDF_STYLE_DRAW (DEFAULT)
- #PDF_STYLE_FILL
- #PDF_STYLE_DRAWANDFILL


pdf_ResetBookMark()

Syntax

pdf_ResetBookMark()

Description

Reset bookmarks for new document


pdf_Rotate()

Syntax

pdf_Rotate(Angle.f [, X.f [, Y.f]])

Description

Perform a rotation around a given center.
The rotation affects all elements which are printed after the method call (with the exception of the
clickable areas).
Remarks:
- Only the display is altered. The pdf_GetX() and pdf_GetY() methods are not affected, nor the
automatic page break mechanism.
- Rotation is not kept from page to page. Each page begins with a null rotation.

Angle
Angle in degrees.

X
Abscissa of the rotation center. Default value: current position.

Y
Ordinate of the rpation center. Default value: current position.


pdf_RoundRect()

Syntax

pdf_RoundRect(X.f, Y.f, W.f, H.f, R.f [, Style$])

Description

Outputs a rounded rectangle. It can be drawn (border only), filled (with no border) or both.

X
Abscissa of upper-left corner.

Y
Ordinate of upper-left corner.

W
Width.

H
Height.

R
Radius.

Style$
Style of rendering. Possible values are:
- #PDF_STYLE_DRAW (DEFAULT)
- #PDF_STYLE_FILL
- #PDF_STYLE_DRAWANDFILL


pdf_Save()

Syntax

pdf_Save(FileName$)

Description

Output PDF to filename.

FileName$
PDF document name.


pdf_ScaleX()

Syntax

pdf_ScaleX(SX.f [, X.f [, Y.f]])

Description

Scaling.

SX
Sacling factor for width as percent. 0 is not allowed.

X
Abscissa of the scaling center. Default is current x position.

Y
Ordinate of the scaling center. Default is current y position.


pdf_ScaleXY()

Syntax

pdf_ScaleXY(S.f [, X.f [, Y.f]])

Description

Scaling.

S
Sacling factor for width and height as percent. 0 is not allowed.

X
Abscissa of the scaling center. Default is current x position.

Y
Ordinate of the scaling center. Default is current y position.


pdf_ScaleY()

Syntax

pdf_ScaleY(SY.f [, X.f [, Y.f]])

Description

Scaling.

SY
Sacling factor for height as percent. 0 is not allowed.

X
Abscissa of the scaling center. Default is current x position.

Y
Ordinate of the scaling center. Default is current y position.


pdf_Sector()

Syntax

pdf_Sector(Xc.f, Yc.f, R.f, A.f, B.f [, Style$ [, Cw.l [, O.f]]])

Description

Draw the sector of a circle. It can be used for instance to render pie charts.

Xc
Abscissa of the center.

Yc
Ordinate of the center.

R
Radius.

A
Start angle (in degrees).

B
End angle (in degrees).

Style$
Style of rendering. Possible values are:
- #PDF_STYLE_DRAW (DEFAULT)
- #PDF_STYLE_FILL
- #PDF_STYLE_DRAWANDFILL

Cw
#True for clockwise. (default)
#False for counterclockwise.

O
Origin of angle in degrees.
Default = 90


pdf_SetAFile()

Syntax

pdf_SetAFile(Link.l, File.l, X.f, Page.l, Text$, Title$, w.f, h.f, DateTime.l, Icon$, Flags.l)

Description

Defines the page and position for File annotations.

Link
The link identifier returned by pdf_Addlink().

X
Ordinate of target position; -1 indicates position at the end of text.

Page
Number of target page; -1 indicates the current page. This is the default value.

Text$
Text To be displayed For the annotation.

Title$
The text label To be displayed.

w
The width of the icon.

h
The height of the icon.

DateTime
The date And time when the annotation was most recently modified.

Icon$
The name of an icon To be used in displaying the annotation.
Graph
Paperclip
GRAPHPUSHPIN
TAG

Flags
Annotation Flags. Currently not in use


pdf_SetALaunch()

Syntax

pdf_SetALaunch(Link.l, Y.f, Page.l, Filename$ [, Dir$ [, Action$ [, Parameter$]]])

Description

Defines the page and position for a launch action.

Link
The link identifier returned by pdf_AddLink().

Y
Ordinate of target position; -1 indicates the current position. The dault value is 0 (top of page).

Page
Number of target page; -1 indicates the current page. This is the default value.

Filename$
The application to be launched or the document to be opened or printed.

Dir$
A string specifying the default directory in standard DOS syntax.

Action$
A string specifying the operation to perform:
[b]open[/b] Open a document.
[b]print[/b] Print a document.

Parameter$
A parameter string to be passed to the application.


pdf_SetAPopUp()

Syntax

pdf_SetAPopUp(Link.l, Y.f, Page.l, Text$ [, Title$ [, w.f, h.f [, DateTime.l [, Icon$ [, Flags.l]]]]])

Description

Defines the page and position for PopUp annotations.

Link
The link identifier returned by pdf_Addlink().

Y
Ordinate of target position; -1 indicates the current position. The dault value is 0 (top of page).

Page
Number of target page; -1 indicates the current page. This is the default value.

Text$
Text To be displayed For the annotation.

Title$
The text label To be displayed in the title bar of the annotation’s
pop-up window when open And active. By convention, this entry identifies
the user who added the annotation.

w
The width of the popup window

h
The height of the popup window

DateTime
The date And time when the annotation was most recently modified.

Icon$
The name of an icon To be used in displaying the annotation.
Comment
Key
Note
Help
NewParagraph
Paragraph
Insert

Flags
Annotation Flags :
#PDF_AF_INVISIBLE
#PDF_AF_HIDDEN
#PDF_AF_PRINT
#PDF_AF_NOZOOM
#PDF_AF_NOROTATE
#PDF_AF_NOVIEW
#PDF_AF_READONLY
#PDF_AF_LOCKED
#PDF_AF_TOGGLENOVIEW


pdf_SetAText()

Syntax

pdf_SetAText(Link.l, Y.f, Page.l, Text$ [, Title$ [, DateTime.l [, Icon$ [, Flags.l]]]])

Description

Defines the page and position for text annotations.

Link
The link identifier returned by pdf_AddLink().

Y
Ordinate of target position; -1 indicates the current position. The dault value is 0 (top of page).

Page
Number of target page; -1 indicates the current page. This is the default value.

Text$
Text to be displayed for the annotation.

Title$
The text label to be displayed in the title bar of the annotation’s
pop-up window when open And active. By convention, this entry identifies
the user who added the annotation.

DateTime
The date and time when the annotation was most recently modified.

Icon$
The name of an icon to be used in displaying the annotation.
Comment
Key
Note
Help
NewParagraph
Paragraph
Insert

Flags
Annotation Flags :
#PDF_AF_INVISIBLE
#PDF_AF_HIDDEN
#PDF_AF_PRINT
#PDF_AF_NOZOOM
#PDF_AF_NOROTATE
#PDF_AF_NOVIEW
#PDF_AF_READONLY
#PDF_AF_LOCKED
#PDF_AF_TOGGLENOVIEW


pdf_SetAuthor()

Syntax

pdf_SetAuthor(Author$)

Description

Defines the author of the document.

Author$
The name of the author.


pdf_SetAutoPageBreak()

Syntax

pdf_SetAutoPageBreak(Auto.l [, Margin.f])

Description

Enables or disables the automatic page braking mode. When enabling, the second parameter is
the distance from the bottom of the page that defines the triggering limit. By default, the mode is
on and the margin is 2cm.

Auto
Boolean indicating if mode should be on or off.

Margin
Distance from the bottom of the page.


pdf_SetCellMargin()

Syntax

pdf_SetCellMargin(CellMargin.f)

Description

Set cell margin.

CellMargin
The margin.


pdf_SetCreator()

Syntax

pdf_SetCreator(Creator$)

Description

Defines the creator of the document. This is typically the name of the application that generates
the PDF.

Creator$
The name of the creator.


pdf_SetDash()

Syntax

pdf_SetDash(Black.l, White.l)

Description

Set a dash pattern and draw dashed lines or rectangles.

Black
Length of dashes.

White
Length of gaps.


pdf_SetDisplayMode()

Syntax

pdf_SetDisplayMode(Zoom.l [, Layout$])

Description

Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages
can be displayed entirely on screen, occupy the full width of the window, use real size, be scaled
by a specific zooming factor or use viewer default (configured in the Preferences menu of
Acrobat). The page layout can be specified too: single at once, continuous display, two columns
or viewer default.
By default, documents use the full width mode continuous display.

Zoom
The zoom to use. It can be one of the following values:
- #PDF_ZOOM_FULLPAGE : displays the entire page on screen
- #PDF_ZOOM_FULLWIDTH : uses maximu width of window
- #PDF_ZOOM_REAL : uses real size (equivalent to 100% zoom)
Default value is #PDF_ZOOM_FULLWIDTH

Layout$
The page layout. Possible values are:
- #PDF_LAYOUT_SINGLE : displays one page at once
- #PDF_LAYOUT_CONTINUOUS : displays pages continuously
- #PDF_LAYOUT_TWO : displays two pages on two columns
Default value is #PDF_LAYOUT_CONTINUOUS.


pdf_SetDrawColor()

Syntax

pdf_SetDrawColor(Red.f [, Green.f [, Blue.f]])

Description

Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be
expressed in RGB components or gray scale. The method can be called before the first page is
created and the value is retained from page to page.

Red
If Green and Blue are given, Red component; if not, indicates the gray level. Value between
0 and 255.

Green
Green component (between 0 and 255).

Blue
Blue component (between 0 and 255).


pdf_SetDrawColorCMYK()

Syntax

pdf_SetDrawColorCMYK(Cyan.f, Magenta.f, Yellow.f, Black.f)

Description

Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be
expressed in CMYK components. The method can be called before the first page is
created and the value is retained from page to page.

Cyan
Cyan component value between 0.0 and 1.0.

Magenta
Magenta component value between 0.0 and 1.0.

Yellow
Yellow component value between 0.0 and 1.0.

Black
Black component value between 0.0 and 1.0.


pdf_SetFillColor()

Syntax

pdf_SetFillColor(Red.f [, Green.f [, Blue.f]])

Description

Defines the color used for all filling operations (filled rectangles and cell backgrounds).
It can be expressed in RGB components or gray scale. The method can be called before the first
page is created and the value is retained from page to page.

Red
If Green and Blue are given, Red component; if not, indicates the gray level. Value between
0 and 255.

Green
Green component (between 0 and 255).

Blue
Blue component (between 0 and 255).


pdf_SetFillColorCMYK()

Syntax

pdf_SetFillColorCMYK(Cyan.f, Magenta.f, Yellow.f, Black.f)

Description

Defines the color used for all filling operations (filled rectangles and cell backgrounds).
It can be expressed in CMYK components. The method can be called before the first
page is created and the value is retained from page to page.

Cyan
Cyan component value between 0.0 and 1.0.

Magenta
Magenta component value between 0.0 and 1.0.

Yellow
Yellow component value between 0.0 and 1.0.

Black
Black component value between 0.0 and 1.0.


pdf_SetFont()

Syntax

pdf_SetFont(Family$ [, Style$ [, Size.l]])

Description

Sets the font used to print character strings. It is mandatory to call this method at least once before
printing text or the resulting document would not be valid. Standard fonts use Windows encoding
cp1252 (Western Europe). The method can be called before the first page is created and the font
is retained from page to page. If you just wish to change the current font size, it is simpler to call
pdf_SetFontSize().

Family$
Family font.
- Courier (fixed width)
- Helvetica or Arial (synonymous; sans serif)
- Times (serif)
- Symbol (symbolic)
It is possible to pass an empty string. In that case, the current family is retained.

This is the translation Table for the 14 Postscript Type 1 Fonts :
- Times-Roman
- Times-Bold
- Times-Italic
- Times-BoldItalic
- Helvetica (=Arial)
- Helvetica-Bold
- Helvetica-Oblique
- Helvetica-BoldOblique
- Courier
- Courier-Bold
- Courier-Oblique
- Courier-BoldOblique
- Symbol
- ZapfDingbats
all fonts that are not on the list will be embedded.
Known limitations : When the fontstyle does not exist the standard font is embedded
*.TTF = Regular Font
*B.TTF = Bold Font
*BI.TTF = Bold Italic Font
*I.TTF = Italic Font

Style$
Font style. Possible values are (case insensitive):
- empty string: regular
- B: bold
- I: italic
- U: underline
or any combination. The default value is regular. Bold and italic styles do not apply to Symbol
and ZapfDingbats.

Size
Font size in points. The default value is the current size. If no size has been specified since
the beginning of the document, the value taken is 12.


pdf_SetFontSize()

Syntax

pdf_SetFontSize(Size.l)

Description

Defines the size of the current font.

Size
The size (in points).


pdf_SetKeywords()

Syntax

pdf_SetKeywords(Keywords$)

Description

Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.

Keywords$
The list of keywords.


pdf_SetLeftMargin()

Syntax

pdf_SetLeftMargin(LeftMargin.f)

Description

Defines the left margin. The method can be called before creating the first page. If the current
abscissa gets out of page, it is brought back to the margin.

LeftMargin
The margin.


pdf_SetLineCap()

Syntax

pdf_SetLineCap(Style.s)

Description

Sets the line cap style.

Style.s
Possible values for Style:

#PDF_LINECAP_BUTT
#PDF_LINECAP_ROUND
#PDF_LINECAP_SQUARE


pdf_SetLineJoin()

Syntax

pdf_SetLineJoin(Style.s)

Description

Sets the line join style.

Style.s
Possible values for Style:

#PDF_JOINSTYLE_MITER
#PDF_JOINSTYLE_ROUND
#PDF_JOINSTYLE_BEVEL


pdf_SetLineWidth()

Syntax

pdf_SetLineWidth(Width.f)

Description

Defines the line width. By default, the value equals 0.2 mm. The method can be called before the
first page is created and the value is retained from page of page.

Width
The width.


pdf_SetLink()

Syntax

pdf_SetLink(Link.l [, Y.f [, Page.l [, Url$]]])

Description

Defines the page and position a link points to.

Link
The link identifier returned by pdf_AddLink().

Y
Ordinate of target position; -1 indicates the current position. The dault value is 0 (top of page).

Page
Number of target page; -1 indicates the current page. This is the default value.

Url$
Internet link.


pdf_SetMargins()

Syntax

pdf_SetMargins(LeftMargin.f, TopMargin.f [, RightMargin.f])

Description

Set left, top and right margins. By default they equal 1 cm. Call this method to change them.

LeftMargin
Left margin.

TopMargin
Top margin.

RightMargin
Right margin. Default value is left one.


pdf_SetNumberingFooter()

Syntax

pdf_SetNumberingFooter(Value.l)

Description

Set footer numbering true/false. Usefull for TOC functions.

Example

Procedure footer()
   If pdf_GetNumberingFooter() = #False
      ProcedureReturn
   EndIf
   pdf_SetY(-15)
   pdf_SetFont("Arial","I",8)
   pdf_Cell(0,7,Str(pdf_NumPageNum()),0,0,#PDF_ALIGN_CENTER)
   If pdf_GetNumbering() = #False
      pdf_SetNumberingFooter(#False)
   EndIf
EndProcedure


pdf_SetProcAcceptPageBreak()

Syntax

pdf_SetProcAcceptPageBreak(ProcAddress)

Description

Set acceptpagebreak procedure.

ProcAddress
Address of the procedure.


pdf_SetProcCompression()

Syntax

pdf_SetProcCompression(ProcAddress)

Description

Set compression procedure.

ProcAddress
Address of the procedure.


pdf_SetProcFooter()

Syntax

pdf_SetProcFooter(ProcAddress [, StructAddress = #Null])

Description

Set footer procedure.

ProcAddress
Address of the procedure.

StructAddress
Address of the structure.


pdf_SetProcHeader()

Syntax

pdf_SetProcHeader(ProcAddress [, StructAddress = #Null])

Description

Set header procedure.

ProcAddress
Address of the procedure.

StructAddress
Address of the structure.


pdf_SetRightMargin()

Syntax

pdf_SetRightMargin(RightMargin.f)

Description

Set right margin. The method can be called before creating the first page.

RightMargin
The margin.


pdf_SetSubject()

Syntax

pdf_SetSubject(Subject$)

Description

Defines the subject of the document.

Subject
The subject.


pdf_SetTextColor()

Syntax

pdf_SetTextColor(Red.f [, Green.f [, Blue.f]])

Description

Defines the color used for text. It can be expressed in RGB components or gray scale. The
method can be called before the first page is created and the value is retained from page to page.

Red
If Green and Blue are given, Red component; if not, indicates the gray level. Value between
0 and 255.

Green
Green component (between 0 and 255).

Blue
Blue component (between 0 and 255).


pdf_SetTextColorCMYK()

Syntax

pdf_SetTextColorCMYK(Cyan.f, Magenta.f, Yellow.f, Black.f)

Description

Defines the color used for text. It can be expressed in CMYK components or gray scale. The
method can be called before the first page is created and the value is retained from page to page.

Cyan
Cyan component value between 0.0 and 1.0.

Magenta
Magenta component value between 0.0 and 1.0.

Yellow
Yellow component value between 0.0 and 1.0.

Black
Black component value between 0.0 and 1.0.


pdf_SetTitle()

Syntax

pdf_SetTitle(Title$)

Description

Defines the title of the document.

Title$
The title.


pdf_SetTopMargin()

Syntax

pdf_SetTopMargin(TopMargin.f)

Description

Set top margin. The method can be called before creating the first page.

TopMargin
The margin.


pdf_SetWs()

Syntax

pdf_SetWs(WordSpacing.f)

Description

Set word spacing.


pdf_SetX()

Syntax

pdf_SetX(X.f)

Description

Defines the abscissa of the current position. If the passed value is negative, it is relative to the
right of the page.

X
The value of the abscissa.


pdf_SetXY()

Syntax

pdf_SetXY(X.f,Y.f)

Description

Defines the abscissa and ordinate of the current position. If the passed values are negative, they
are relative respectively to the right bottom of the page.

X
The value of the abscissa.

Y
The value of the ordinate.


pdf_SetY()

Syntax

pdf_SetY(Y.f)

Description

Moves the current abscissa back to the left margin and sets the ordinate. If the passed value is
negative, it is relative to the bottom of the page.

Y
The value of the ordinate.


pdf_Skew()

Syntax

pdf_Skew(AngleX.f, AngleY [, X.f [, Y.f]])

Description

Skewing.

AngleX
Angle in degrees between -90 (skew to the left) and 90 (skew to the right)

AngleY
Angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)

X
Abscissa of the skewing center. Default is current x position.

Y
Ordinate of the skewing center. Default is current y position.


pdf_SkewX()

Syntax

pdf_SkewX(AngleX [, X.f [, Y.f]])

Description

Skewing.

AngleX
Angle in degrees between -90 (skew to the left) and 90 (skew to the right)

X
Abscissa of the skewing center. Default is current x position.

Y
Ordinate of the skewing center. Default is current y position.


pdf_SkewY()

Syntax

pdf_SkewY(AngleY [, X.f [, Y.f]])

Description

Skewing.

AngleY
Angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)

X
Abscissa of the skewing center. Default is current x position.

Y
Ordinate of the skewing center. Default is current y position.


pdf_StartPageNums()

Syntax

pdf_StartPageNums()

Description

Start TOC page numbering.


pdf_StartTransform()

Syntax

pdf_StartTransform()

Description

Use this before calling any transformation.
(Scale, Skew, Mirror, Translate)


pdf_StopPageNums()

Syntax

pdf_StopPageNums()

Description

Stop TOC page numbering.


pdf_StopTransform()

Syntax

pdf_StopTransform()

Description

Restore the normal painting and placing behaviour as it was before calling pdf_StartTransform().


pdf_SubWrite()

Syntax

pdf_SubWrite(H.f, Txt$ [, Link.l [, SubFontSize.l [, SubOffSet.f]]])

Description

This method print text from the current position in the same way as pdf_Write(). An additional
parameter allows to reduce or increase the font size; it's useful for initials.
A second parameter allows to specify an offset so that text is placed at a superscripted or
supscripted position.

H
Line height.

Txt$
String to print.

Link
Identifier returned by pdf_AddLink().

SubFontSize
Size of font in points (12 by default).

SubOffSet
Offset of text in points (positive means superscript, negative subscript; 0 by default).


pdf_TOCEntry()

Syntax

pdf_TOCEntry(Text$ [, Level.l])

Description

Set TOC entry.

Text$
The TOC entry title.

Level
The TOC level (0 is top level, 1 is just below, and so on).


pdf_Text()

Syntax

pdf_Text(X.f,Y.f,Text$)

Description

Prints a character string. The origin is on the left of the first character, on the baseline. This method
allows to place a string precisely on the page, but it is usually easier to use pdf_Cell(),
pdf_MultiCell() or pdf_Write() which are the standard methods to print text.

X
Abscissa of the origin.

Y
Ordinate of the origin.

Text$
String to print.


pdf_TextString()

Syntax

pdf_TextString(String$)

Description

Format a text string.


pdf_Translate()

Syntax

pdf_Translate(TX.f, TY.f)

Description

Translate.

TX
Movement to the right.

TY
Movement to the bottom.


pdf_TranslateX()

Syntax

pdf_TranslateX(TX.f)

Description

Translate.

TX
Movement to the right.


pdf_TranslateY()

Syntax

pdf_TranslateY(TY.f)

Description

Translate.

TY
Movement to the bottom.


pdf_TruncateCell()

Syntax

pdf_TruncateCell(w.f, h.f, Text$ [, Border.l [, Ln.f [, Align$ [, Fill.f [, Link.l [, Trunc$]]]]]])

Description

Same as pdf_Cell but the text is truncated if it does not fit into the cell.

W
Cell width. If 0, the cell extends up to the right margin.

H
Cell height. Default value :0.

Text$
String to print. Default value: empty string.

Border
Indicates if borders must be drawn around the cell. The value can be:
- 0: no border
- 1: frame
or the sum of the following constants:
- #PDF_CELL_LEFTBORDER
- #PDF_CELL_TOPBORDER
- #PDF_CELL_RIGHTBORDER
- #PDF_CELL_BOTTOMBORDER
Default value: 0.

Ln
Indicates where the current position should go after the call. Possible values are:
- 0: to the right
- 1: to the beginning of the next line
- 2: below
Putting 1 is equivalent to putting 0 and calling pdf_Ln() just after. Default value: 0.

Align$
Allows to center or align the text. Possible values are:
- #PDF_ALIGN_RIGHT
- #PDF_ALIGN_LEFT
- #PDF_ALIGN_FORCEDJUSTIFIED
- #PDF_ALIGN_JUSTIFIED
- #PDF_ALIGN_CENTER

Fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.

Link
Identifier returned by pdf_AddLink().

Trunc$
This string is appended at the end of the text. Default value : ...


pdf_Triangle()

Syntax

pdf_Triangle(X1.f, Y1.f, X2.f, Y2.f, X3.f, Y3.f [, Style$])

Description

Draws a Triangle between the points (X1, Y1 / X2, Y2 / X3, Y3).


pdf_Write()

Syntax

pdf_Write(H.f, Text$ [, Link.l])

Description

This method prints text from the current position. When the right margin is reached a line break
occurs and text continues from the left margin. Upon method exit, the current position is left
just at the end of the text. It is possible to put a link on the text.

H
Line height.

Text$
String to print.

Link
Identifier returned by pdf_AddLink().


History

Version 2.24 (13.2.2013)
- added pdf_SetDrawColorCMYK() pdf_SetFillColorCMYK() pdf_SetTextColorCMYK() (Thanks to Erlend Rovik)
- added optional parameter "StructureAdress" to pdf_SetProcFooter() and pdf_SetProcHeader() (Thanks to Guimauve)
- added pdf_SetLineCap() and pdf_SetLineJoin() (Thanks to Po)

Version 2.23 (29.5.2012)
- added WMF support (requested by Oliver13)

Version 2.22 (9.5.2012)
- fixed the pdf_Write() command (Thanks to Seldon)

Version 2.21 (17.9.2011)
- added Tutorial32 Unicode.pb
- added Parameter to pdf_SetFont(Family$,Style$,Size,Unicode)
set Unicode to #True to use Unicode-Font
- added Unicode-Fonts support
- fixed memory leak in ipf_LocalDecimal()
- updated ipf_Endian() procedures (Thanks to Rescator/skywalk/wilbert)
- updated ipf_Get_CharWidth()
- added /Ascent /Descent /CapHeight /ItalicAngle /StemV /MissingWidth to unicode fonts
- fixed bug in ipf_EscapeU() when printing unicode strings like $010D where $0D has to be ecaped
- removed the unicode parameter from pdf_SetFont()
its now handled automatically when in unicode mode
- added unicode support to ipf_PutInfo()
- fixed broken glyph code ipf_Handle_MS_Encoding()
- fixed UnicodeHeader bug in ipf_EcapeU()
- fixed bug in ipf_Cell() found by Malo
- fixed bug in resource freeing

Version 2.20 (10.3.2011)
- added pdf_GetMultiCellNewLines()
- fixed pdf_Cell() removes newlines and linefeeds at the end of each line

Version 2.19 (21.7.2010)
- fixed a bug in pdf_Cell() found by Thorsten1867
- added new path functions
- pdf_PathBegin()
- pdf_PathArc()
- pdf_PathLine()
- pdf_PathRect()
- pdf_PathEnd()

Version 2.17 (11.6.2010)
- added pdf_RoundRect(X.f, Y.f, W.f, H.f, R.f [, Style$]
(feature request was made by Num3)

Version 2.16 (1.6.2010)
- fixed memory corruption in MEM_DataReplace()
(found by merendo)

Version 2.15 (14.8.2009)
- fixed startxref now points at xref

Version 2.14 (2.11.2008)
- fixed for PureBasic 4.30
- added ASCII85 Encode/Decode routines
- added pdf_EmbedFile()
- added format parameter to pdf_AddPage()
- added pdf_SetALaunc()
- added pdf_SetAText()

Version 2.13 (2.9.2008)
-Fixed pdf_TruncateCell() (Thanks to Thorsten1867)

Version 2.12 (28.5.2008)
- fixed for PureBasic 4.20
- PurePDFMisc now included in PurePDF
- PurePDFDraw now included in PurePDF

Version 2.11 (2.5.2008)
-new pdf_TruncateCell (made by Thorsten1867)
-fixed pdf_Link was broken

Version 2.10 (1.5.2008)
-neu pdf_SkipCell (made by Thorsten1867)

Version 2.09 (2.1.2008)
-fixed for PureBasic 4.20 Beta 1

Version 2.08 (6.7.2007)
- fixed problem with bookmarks (thanks to Thorsten1867)

Version 2.07 (28.12.2006)
- fixed problem with decimal separator

Version 2.06 (12/11/2006)
- pdf_SetFont() embeds the font when not in the list of standard fonts

Version 2.05 (17.11.2006)
- pdf_IncludeFileJS(FileName.s) Sponsored by Flype

Version 2.05 (12/11/2006)

PurePDF for PB4.01
- unicode compatible
- PDFMisc + PDFDraw in same zip file

Version 2.04 (17/5/2006)

PurePDF for PB4.00

Version 2.03 (28/3/2006)

New command :
- pdf_ImageMem(Name$,*Mem,MemSize,X.f,Y.f)

Version 2.02 (28/11/2005)

Bug fix :
- pdf_SetRightMargin()
- Internal function : solves pdf_BookMark() bug

Version 2.01 (23/10/2005)

New function : pdf_GetErrorMessage()
Bug fix :
- pdf_Write()
- pdf_Save()

Version 2.00 (16/10/2005)

Several functions, starting with ipf - (I)nternal (P)DF (F)unction - are added. They will make it possible to
create extension libraries for PurePDF. Due to this new structure following functions will be found in

pdfBarCode :
- pdf_UPC_A()
- pdf_EAN13()

PurePDFDraw :
- pdf_Circle()
- pdf_Ellipse()
- pdf_Rotate()
- pdf_Sector()
- pdf_SetDash()

PurePDFMisc
- pdf_BookMark
- pdf_DisplayPreferences()
- pdf_MulticellBlt()
- pdf_IncludeJS()

Other changes :
See examples to find out more.


PurePDF library license

This purebasic user library is provided 'as-is', without any express or implied warranty.
In no event will the author be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and redistribute it freely.