wxPdfCOM PDF Generation Manual
wxPdfCOM PDF Generation Manual
Reference Manual
Reference manual
1
J. Sánchez. wxPdfCOM. Reference Manual
Introduction
A COM object is essentially a dynamic link library (DLL) with the capability to
expose its user interface to other programs. Once the component is referenced in a
Visual Basic project, the PDF document is converted into another object of the language.
in the same way as the Printer or App objects.
The COM object is nothing more than a wrapper for the true generator engine of the
PDF documents, which is none other than wxPdfDocument. wxPdfDocument is code
open, just like wxWidgets and in turn is a translation of the also free FPDF.
In case so many names introduce any confusion for the reader, in the following
we will address each of them in detail so that they become more useful to us
relatives.
FPDF
FPDF is a class written in PHP that allows the generation of PDF documents directly, without
use no external library. The F in FPDF stands for Free (free and open): it can be used
for any purpose and to modify it to suit one's own needs.
You can find everything related to FPDF on the internet (how could you not?). The address is
[Link] There you can find the source code of the class in question, a manual.
with all the commands, usage examples, and a section of scripts created by
Collaborators that in some cases only serve to further extend the initial capacity.
from the original class.
2
J. Sánchez. wxPdfCOM. Reference Manual
To use FPDF you only need an Internet server with PHP installed, your web pages.
they can contain PHP code to generate PDF documents and save them in a
file or send them directly to a browser. Since FPDF is free, anyone
puede tomar su código y modificarlo o copiarlo. Muchos ya lo han hecho. Gracias a esto
There are versions of FPDF in other languages, namely: ASP, Lingo, Python, Ruby, C++.
By the way, the C++ version is called wxPdfDocument and we will talk about it soon, but
First we will talk about wxWidgets.
wxWidgets
The website address is [Link] There, dear reader, you will be able to
delve into this formidable tool that others have chosen to share. As you will see
it's a whole world, wxForum, wxWiki, wxCommunity, wxBlog, wxCode. Everything is wx and everything
it's free. Although you can always make a donation or choose to collaborate. By the way
from wxCode...
wxCode
wxPdfDocument
Its author is named Ulrich Telle. wxPdfDocument is a library based on wxWidgets that
allows generating PDF documents. It is one more of the adaptations that have been
realizado de FPDF, la clase original escrita en PHP. Algunos de los scripts en PHP que
you can find on the FPDF website have been incorporated into wxPdfDocument.
In addition to the 14 standard Adobe fonts, it is possible to use other Type1 fonts or
TrueType that can be internal or external to the generated document. In compilations
Unicode also allows the use of CJK fonts. This means you can generate
documents in languages with a character set different from Western. In fact, CJK
3
J. Sánchez. wxPdfCOM. Reference Manual
they are the initials of Chinese, Japanese and Korean (Korea in English). The documentation itself that
The following features are highlighted alongside wxPdfDocument:
COM
4
J. Sánchez. wxPdfCOM. Reference manual
• Regarding PHP, it is not necessary to have a Web server to be able to execute the
scripts.
• Runs faster than PHP, and does not have 'time out' issues in creation of
extensive documents.
• With minor differences, it retains the original syntax of FPDF, so you can
continue inspiring yourself or directly import the sample scripts that abound in
the Network.
• Like the others, it is free.
5
J. Sánchez. wxPdfCOM. Reference manual
Before you start using the generator, it is necessary to register the component in our
machine and create a reference within the project that will invoke it. To do this you must
open the project menu and select the references option. A window similar to
that of figure 1. In it, the corresponding reference to wxPdfCom must be marked as
as shown in this example.
Sometimes it is
posible que al seleccionar la
reference and press accept,
to be produced an error.
An unexpected exit from the Vb6 environment may even occur, with the consequence
immediate loss of the last changes that have not been saved.
In that case, you can try to manually register the component. To do this, you need to
enter the Windows Start menu and select the Run option. In the window of
to execute we must invoke the program [Link] and pass it the path as an argument
complete with wxPdfCom. For example, assuming we have installed the library in
c:/winnt/ we will put:
regsvr32 c:/winnt/[Link]
The system responds with a message saying that the file registration has been successful.
Hooray! Right now, if all has gone well, you are supposed to be ready to start.
to use your favorite PDF file generator. The next thing we can do is to include
the file of predefined constants. Let's see what this file is.
6
J.Sánchez. wxPdfCOM. Reference manual
Constants file
The constants file is a .bas module, which we find in the example project.
with the name [Link], a clear reminiscence of the C language. In fact, the values
what is defined in this file is the same as what wxPdfdocument uses for its
internal functioning. These constants will help us provide greater readability to
our source code.
For example, when we want to express that we wish for a piece of text to appear
centered, we can put the number 2, but it looks much better to put
PDF_ALIGN_CENTER. No one prevents you from renaming these constants to another name that
we like more. Even in other languages different from English.
In the examples of this axial manual as in the examples included in the library and the site
The wxPdfCOM website retains a similar nomenclature to the original for several reasons.
First of all, for the convenience of not having to look for other names, secondly
out of deference to their original authors. And finally for usefulness, they are the constants that
uses the majority, (users of FPDF, wxPdfDocument and wxPdfCOM).
In order to create our first PDF document, we must declare a variable of the type
suitable. The integrated environment will help us by showing a list of available types
just type dim, the name for our object and a space.
If we have correctly registered the component, in the dropdown list that appears,
we will find the reference we are looking for. See figure. We select [Link] and
our line of code will be as follows.
7
J.Sánchez. wxPdfCOM. Manual de referencia
Assigning memory
Before using it, we have one last step, to assign memory for the object with the
new operator. Just like when we declare the variable, our IDE will show us a
dropdown list with the available options so we don't have to type the name
complete. The new line of code will be as follows.
8
J.Sánchez. wxPdfCOM. Reference Manual
User manual
General considerations
Passing arguments
It is to be expected that this feature will change in future versions of the component with the
introduction of optional arguments.
Array step
The passing of arrays from Visual Basic to wxPdfCOM requires special attention. A
mistake in the way of declaring an array that is to be passed as an argument to a
function can cause errors in the result, or even an automation error and a
program collapse.
In Visual Basic there are several possibilities when it comes to declaring an array. Let's see.
various options.
Option A - Declare a variable without a type, (the compiler will create a variable of the type
variant), and then populate it later using the Array() function. For example:
Two cities
ciudadesArray("Madrid", "Sevilla", "Valencia", "León")
Option B - Declare an array of a specific type and size and assign a value to each of its elements.
members individually:
9
J. Sánchez. wxPdfCOM. Reference Manual
The memory representation of these two arrays is different in each case. If we wanted to
create a ComboBox with city names we must pass to the ComboBox function the
second type of array.
All functions that have an array of any type in their argument list will be
may be affected by this peculiarity. It is recommended to examine carefully the
Documentation of those functions before using them or looking at the examples.
If you have problems with any function of this class, the solution may be to change.
the declaration of the array or the way to populate it with data. You have been warned.
Cumulative arguments
The C and C++ languages can easily work at the bit level. With them, one can
manipulate a numeric variable and check the activation status of each of its bits.
On numerous occasions, a numeric variable is used to store a series of
state values, where it only stores whether the value of a certain bit is activated or
disabled, true or false. These variables are usually referred to as 'flags'.
The memory savings with the use of flags is considerable since in the case of an integer that
it occupies two bytes, we have eight variables in one. Let's look at a real case, the argument
'border' of the Cell() method. This argument allows us to specify the type of frame that
we wish for the cell. We can select a border for each of the four sides
of the rectangle. The following table shows the predefined constants to use
with the argument 'border'.
PDF_BORDER_NONE 0
PDF_BORDER_LEFT 1
10
J. Sánchez. wxPdfCOM. Reference Manual
PDF_BORDER_RIGHT 2
PDF_BORDER_TOP 4
PDF_BORDER_BOTTOM 8
PDF_BORDER_FRAME 15
Below we show the same table but with the values in binary:
PDF_BORDER_NONE 0000
PDF_BORDER_LEFT 0001
PDF_BORDER_RIGHT 0010
PDF_BORDER_TOP 0100
PDF_BORDER_BOTTOM 1000
PDF_BORDER_FRAME 1111
As you will observe, each of the four sides has been assigned a bit. The left side has
assigned the first bit on the right, the right side has the second bit assigned, the side
the superior is the third and the lower side is assigned the fourth bit.
If we work in C, we can use the 'or' operator to combine the options. Since
example, the expression:
is equivalent to
(PDF_BORDER_FRAME)
To work with wxPdfCOM instead of using the 'or' operator, we have to add the
arguments to obtain a combined effect of them. Note that: 1+2+4+8
adds up to 15. Now imagine that you want to print with Cell() a cell in the shape of a U, it is
11
J. Sánchez. wxPdfCOM. Reference Manual
say, with all the borders activated except the top one, the third one from the right. You will have
to accumulate in the following way:
Or what is the same as adding the decimal values, (1+2+8). The result is 11 which translated to
binary is 1011, where the third bit is disabled. You can use the calculator of
system for making tests, in 'scientific calculator' mode you have radio buttons for
perform conversions between various numerical bases.
Definir un formato será lo primero que tengamos que hacer cada vez que tengamos que
create a new PDF document. It's not the same to create a letter, a novel, or a
calendar, each type of document will be adjusted to standards that often
we will have to continue.
As one of the most widely used formats, A4, letter size, is the default format in
wxPdfCOM. To create a document in A4 format, (210x297mm) it is not necessary to do
Nothing special, apart from declaring a PDF variable and adding pages to it. Only in the case of
if we need a different format, we will need to use the Initialize() function. In such
In this case, this should be the first function we need to call. For more information
check the reference of Initialize().
Document properties
There is a series of functions that help us document our PDF file. These
functions are the ones that appear in Acrobat when we check the properties of the
document. The following list enumerates the most important ones. In the reference
For each of them, you will find more precise instructions for their use.
Argumentos Descripción
SetAuthor() Define the author of the document
SetCreator() Set the name of the application that created the document
SetKeywords() Define the keywords of the document.
SetSubject() Establish the subject of the document
SetTitle() Define the title of the document
SetDisplayMode() Sets the initial display options
One of the few differences that exist between wxPdfCOM and its predecessors (FPDF and
wxPdfDocument relies precisely on the handling of the header and footer.
12
J. Sánchez. wxPdfCOM. Reference Manual
Both C++ and PHP allow class inheritance. In both cases, the class
original defines the header and footer as virtual functions. The functions
virtuals do absolutely nothing, they have to be defined within the instances of
the class if you want to use its functionality. Then, during the creation of the document
PDF, the functions defined by the editor are called automatically for each new
page that is inserted into the document. Both the header and the footer are defined
only once regardless of the number of pages of the document.
wxPdfCOM does not allow inheriting any function from the original class although that is not
obstacle for us to define a header or footer. Simply the
the procedure is different. The header or footer is defined within a block
Head (or Foot). The Head block starts with the command Head(true) and ends with the
Head(false) command. All commands invoked within this block will not be
they will not be executed immediately but will be stored in memory to be used later.
Not all commands are suitable to be included in a header or footer.
The following table includes a list of the accepted commands. The commands do not
appropriate ones will be executed directly instead of being stored.
Print texts
WxPdfCOM has various methods to print text, from the simple Text()
even the most complex WriteXML. In this section, we will enumerate and compare the
different methods. In the individual reference of each of them you will find
more precise instructions for its use. The most common methods for displaying text
son
Argumentos Descripción
Text() Texto sencillo
13
J. Sánchez. wxPdfCOM. Reference Manual
Text(x,y,txt)
Es tal vez el más sencillo de todos estos métodos. Toma unas coordenadas e imprime el
text that you pass as an argument. If the text is so long that it does not fit in a single line, it
will lose on the right side of the screen.
RotatedText(x,y,txt,angle)
Example of RotatedText()
Write(h,txt,link)
Another advantage is that if the text is too long, Write() jumps to the beginning of the
next line and continue writing upon reaching the right margin. Also, you can
convert the text into a hyperlink that when clicked will take the user to the URL or link
specified in the 'link' argument. What Write does not do is justify the text, if the
the next word doesn't fit on the line, it jumps to the next leaving a space between the last
word and the right margin.
Cell() is one of the most commonly used methods to display text. Cell() is based on the
current coordinates to display a text. Optionally, the type can be specified
framed, the alignment and the padding. You can create a hyperlink and decide in which
position will be the pointer after displaying the text. If the text is longer than the
available space, no automatic line break occurs and the text may overflow
cell width. Cell() can be useful for constructing tables.
14
J.Sánchez. wxPdfCOM. Reference manual
This command has exactly the same arguments and works the same as Cell() except
that does not overflow the cell limits, the text is truncated if its length exceeds
the available width. ClippedCell has what could be a bug, the argument w
when it is zero, it makes the cell take up the available line width, however the value
Zero applies to the trimming so that a blank cell appears when w is equal to zero.
The paragraph you are currently reading is created with MultiCell(). It is another of the
common methods, is very similar to Cell() but has the advantage of extending to several
lines if necessary just like Write() does. Although unlike Write(), MultiCell()
if it supports the alignment.
ImportText (FileName)
ImportText is a special case of MultiCell(), it is based on the current position, it does not use a border.
I fill in and display a justified text. Its peculiarity is that the text is read from a
disk file whose name is the only argument of this method.
In WriteCell, the cell width is automatically calculated based on the length of the
text. If it exceeds the available width, another cell will be created with its corresponding frame in the
next line and with the precise length to accommodate the remaining text.
TextBox( w,h,txt,halign,valign,border,fill)
This is another command similar to MultiCell. Its most notable feature is that it supports
alignment both vertical and horizontal.
WriteXML (txt)
Another text method with a single argument, in this case, it is a string of text that can
contain HTML tags that will be interpreted accordingly. This command is
multiline.
Argumentos Descripción
... Negrita
... Italica
... Underlined
... Marked
<s> ... </s> Crossed out
15
J. Sanchez. wxPdfCOM. Reference manual
... Bold
... Emphasized, similar to <i>
<small> ... </small> Reduced size
... Superscript
... Subscript
<h1> ... </h1> Labels from one to six
... Text with form
ClippingText(x,y,txt,outline)
ShapedText (shape,text,mode)
This method allows for another special effect. It consists of defining a shape with
shape commands and make the text draw along the path of the
defined form.
16
J.Sánchez. wxPdfCOM. Reference manual
Graphs
One of the strengths of the PDF format is its graphic power. In WxPdfCOM it allows
exploit this feature with numerous specialized methods in graphic output.
So much used either in isolation or in combination with each other or with other color methods or
Transformation, the graphical methods will allow you to carry out a large number of effects.
The following is a list of the methods available in wxPdfCOM. Next, you
we show its use with some examples.
Argumentos Descripción
Arrow Draw an arrow
DrawCircle Circle
Ellipse Ellipse
Polygon Polygon
Rect Rectangle
Sector Sector
Example of Arrow()
17
J.Sánchez. wxPdfCOM. Reference manual
Source code :
x [Link]
y [Link]
[Link] 0, 0, 0
[Link] 0, 0, 0
[Link] 0, 0, 0
[Link] x, y, db1 + 100, db2, 2, 5, 3
The following example illustrates the use of Clippingellipse(). The ellipse is filled with something
text from a loop. Finally, UnsetClipping() is called to return to normal mode.
Source code:
db1 [Link] + 50
db2 [Link] + 15
[Link] db1, db2, 10, 5, True
For x 0 To 200 Step 5
[Link] x, db2 + 10, "clipped text clipped text clipped text clipped text", 30
Next
[Link]
18
J. Sánchez. wxPdfCOM. Reference Manual
Source code :
db1 [Link] + 50
db2 [Link] + 15
[Link] 'cshape', db1, db2
[Link] 'cshape', db1 + 20, db2 - 10
[Link] 'cshape', db1 + 30, db2 + 10
[Link] 'cshape', db1 + 40, db2 - 10
[Link] 'cshape', db1 + 50, db2 + 15
[Link] 'cshape', db1, db2 + 20, db1, db2 + 20, db1, db2
[Link] 1
[Link] 250, 0, 0
[Link] 'cshape', PDF_STYLE_FILLDRAW
For x from 0 to 200 step 5
[Link] x, db2 + 20, 'clipped text clipped text clippe', 30
Next
[Link]
Example of ClippingPolygon()
Source code:
Let y, z
y Array(70#, 100#, 80#, 110#, 70#)
Array(175#, 195#, 195#, 200#, 205#)
[Link] y, z, True
For x 0 To 200 Step 5
[Link] x, 205, 'clipped text clipped text clippe', 30
Next
[Link]
19
J. Sánchez. wxPdfCOM. Reference Manual
Example of ClippingRect()
Source code:
db1 [Link]
db2 [Link] + 20
[Link] db1, db2, 60, 20, True
For x 0 To 500 Step 5
[Link] x, db2 + 20, "clipped text clipped text", 30
Next
[Link]
Source code :
db1 [Link]
db2 [Link] + 30
[Link] db1, db2, 10, 0, 360, PDF_STYLE_FILLDRAW, 0
[Link] db1 + 30, db2, 10, 0, 180, PDF_STYLE_FILL, 0
[Link] db1 + 60, db2, 10, 5, 20, 0, 360, PDF_STYLE_FILLDRAW, 0
20
J.Sánchez. wxPdfCOM. Reference Manual
Reference of instructions
When a page break is necessary, a call to this method occurs. The break of
page is produced whenever the return value of AcceptPageBreak is true. For
the returned value depends on the mode set by SetAutoPageBreak()
See SetAutoPageBreak()
AddFont
Arguments
Indicate the family to which the source belongs. Any can be adopted.
Family name
but if it matches an existing standard name, it will replace it
Style Font style. Possible values in the following table (case insensitive)
Font definition file. An empty string can be passed in
File
in which case the name is constructed from the values family and style
Source
Values for style
(Vacío) Normal
B Bold
I Italica
BI or IB Bold and Italic
AddFontCJK
Import a CJK font (Chinese, Japanese, or Korean). The definition file of the
source must have been created beforehand and be available in the subdirectory
actual.
21
J. Sánchez. wxPdfCOM. Reference Manual
View: SetFont()
Argumentos Descripción
Indicate the family to which the source belongs. Any can be adopted.
name
but if it matches an existing standard name, it will replace it. It does not require
Family
specify style since all available ones are installed The name of
definition file is automatically created with the value 'Family' in
lowercase and without spaces
AddLink
Create an internal link. An internal link is an area that can be clicked on and jumped to.
another part of the document. Return a valid identifier to pass as an argument to
Cell(), Write(), Image() or Link(). The destination point of the jump is defined with SetLink()
Add Page
Añade una página al documento. Si existe una página anterior, llama a Footer() antes de
create the new page and a Header() for the new one. When creating a new page, the position is
fixed in the upper left corner according to the established margins. The values
previously established, if any, for font type, colors, and line width,
are kept on the new page. The origin of the coordinate system is at the top and to the
left and these increase downward and to the right.
22
J.Sánchez. wxPdfCOM. Reference Manual
AliasNbPages
Define an alias for the total number of pages. This will be replaced when closing the document.
In FPDF and wxPdfDocument, the default value for this function is 'nb' in curly braces {}.
In wxPdfCPM, its use is recommended for compatibility. There is an internal alias for the
current page number, is for restricted use, its value {pg} and there is no function for
change it.
String that will be replaced by the total number of pages at the end of the
alias
document.
Description
Annotate
Arguments Descripción
23
J. Sánchez. wxPdfCOM. Reference Manual
AppendJavaScript
Rice
AxialGradient
24
J.Sánchez. wxPdfCOM. Reference Manual
y2 Ordered from the second point of the degraded vector. (range 0..1)
Interpolation exponent
intexp
Bookmark
level Level 0 is the highest level. 1 and subsequent represent the sub-headings.
Cell
Print a cell (rectangular area), allows specifying the framing, background color and
a text. The origin of the cell is the current position of the writing pointer. The text is
it can be aligned to one side or centered. After the call to Cell(), the
position moves right after or jumps to the next line. Cell allows that
texto funcione como un enlace. Si está habilitado el salto de página automático y Cell va
Beyond the limit, a page break occurs beforehand.
border Define the type of cell border according to the Border table.
It is used to indicate the position of the writing pointer after Cell
ln
0: A continuación, 1: Al inicio de la línea siguiente 2: Debajo
align Set the alignment for the text according to the align table
fill Filling
25
J. Sánchez. wxPdfCOM. Reference Manual
CheckBox
Add a 'check box' type field to the list of fields in the form.
A
name Assigned name to the field
x Abscissa of the position
y Ordered from the position
width Field width
checked Default value
ClippedCell
This function is the same as Cell() except that the cell is cropped when it exceeds the limits of
rectangle. Print a cell (rectangular area), allows specifying the framing, the
background color and a text. The origin of the cell is the current position of the pointer.
26
J.Sánchez. wxPdfCOM. Reference Manual
writing. The text can be aligned to one side or be centered. After the
call to Cell(), the position moves right after or jumps to the next line. Cell
permite que el texto funcione como un enlace. Si está habilitado el salto de página
automatic and Cell goes beyond the limit, a previous page break occurs.
align Set the alignment for the text according to the 'alignment' table
fill Filling
Description
Possible values for border
BORDER_NONE Without edge
27
J. Sánchez. wxPdfCOM. Reference Manual
Argumentos Descripción
As they are numerical constants, they can be summed to combine their effect.
ClippingEllipse
rx Horizontal radio
Clipping Path
Define a mask in the shape of an object shape. A mask restricts the output.
preventing any element from being displayed outside the area defined by it.
Argumentos Descripción
Name of the Shape object that defines the area of
shape
mask
style Drawing style can be one of the following:
PDF_STYLE_FILL Filling
28
J. Sánchez. wxPdfCOM. Reference Manual
ClippingPolygon
Define a polygon as a framed area. A framed area restricts the output and
prevents objects from being displayed outside of it.
Argumentos Descripción
x Array of abscissas
y Ordered array
ClippingRect
Define a rectangle as a framed area. A framed area restricts the output and
prevents objects from being displayed outside of it.
Argumentos Descripción
x X-coordinate of the upper left corner
ClippingText
Define a text as a framing area. A framing area restricts the output and
prevents objects from being displayed outside of it.
Argumentos Descripción
x Abscissa of the upper left corner
txt Text
29
J. Sánchez. wxPdfCOM. Reference manual
CloseFile
Finalize the editing of the PDF document. It is not necessary to call this method.
explicitly since SaveFile() does it automatically. If no page exists
in the document, Close() calls AddPage() to prevent the creation of a document
invalid.
ClosePath
Close the framing path. A framing area restricts the output by preventing that
some element is drawn outside the defined area.
Argumentos Descripción
style Style
PDF_STYLE_FILL Filling
ComboBox
Add a combo type field at the specified coordinates or at the current position.
The list of values will be an array of strings where each element will be populated.
independently. Use the array() function in Visual Basic to assign elements to a
Variant would cause an error if we try to pass it to ComboBox.
Argumentos Descripción
name Field name
width Width
height High
30
J.Sánchez. wxPdfCOM. Reference manual
Convert2Roman
Curve
Draw a Bezier curve. A Bezier curve is tangent to the line that connects the points.
de control a cada lado de la curva.
Argumentos Descripción
x0 Abscissa of the starting point
PDF_STYLE_DRAW Contour
PDF_STYLE_FILL Fill
CurveTo
Add a cubic Bezier curve to the current path or subpath. The curve extends from the
current point to the point (x3,y3), using control points 1 and 2. Set (x3,y3)
as a new current point.
See Curve()
31
J. Sánchez. wxPdfCOM. Reference manual
Argumentos Descripción
x1 Abscissa of the first control point
DrawCircle
Draw a circle given the coordinates of its center, the radius, and the start and end angles.
The angle values must be between 0 and 360. A final angle of 0 is
interpret as 360.
Argumentos Descripción
x0 Abscissa of the position
r Circle radius
Ellipse
Draw an ellipse
Argumentos Descripción
Abscissa of the center
x0
Ordered from the center
y0
Horizontal radio
rx
32
J. Sánchez. wxPdfCOM. Reference manual
EndTemplate
Footer
Starts or ends the definition of the footer. Takes a boolean value as an argument.
(true or false) that defines the beginning and the end of the footer definition block. No
All commands are suitable for inclusion in the block. It is necessary to close a block.
that has been opened.
Argumentos Descripción
Valor de comienzo/fin de la definición del
define
footer block
True The recording of the block begins.
GetBreakMargin
GetCellMargin
GetFontFamily
33
J. Sánchez. wxPdfCOM. Reference manual
See: SetFont()
GetFontPath
Returns the path of the folder where the font definition files will be searched.
By default, its name is /fonts but it can be changed with SetFontPath().
GetFontSize
See: SetFont()
GetFontStyle
See: SetFont()
GetFontSubsetting
GetImageScale
GetLeftMargin
See: SetLeftMargin().
GetLineHeight
GetLineWidth
34
J. Sánchez. wxPdfCOM. Reference manual
GetPageHeight
GetPageWidth
GetScaleFactor
Return the scaling factor (the number of points per user unit).
GetStringWidth
Returns the length of a string in the user's unit. Takes into account
the current font type, its style and size. There should be a selected font.
Argumentos Descripción
s String whose length the function will return
GetTemplateBBox
Get the dimensions of an external model The dimensions of the imported pages
External PDF documents are often of interest. This function takes part of your
arguments by reference and deposit the result in them. The returned values are
correspond to the coordinates of the bottom left point, the width and the height of the model
or template.
GetTemplateSize
35
J.Sánchez. wxPdfCOM. Reference Manual
Gets the calculated size of a model or template. The width and/or height must have a
value less than or equal to zero to be calculated. If one of these values is exceeded with value
zero, will be returned with the value calculated in proportion to the other element.
GetTopMargin
GetX
GetY
HEADER
Starts or ends the definition of the page header. Takes a value as an argument.
logical (true or false) that defines the beginning and the end of the header definition block.
Not all commands are suitable to be included in the block. It is necessary to close a
block that has been opened.
Argumentos Descripción
Start/end value of the definition of the
define
header block of page
True : The recording of the block begins
36
J. Sánchez. wxPdfCOM. Reference manual
Image
Print an image in the specified position and with the specified dimensions. Optionally
can include a link or can be displayed delimited by a mask. The
coordinates of the top left corner must be specified.
As for the dimensions, they can be given explicitly or let wxPdfCOM determine them.
Calculate. If one is exceeded, the other is calculated proportionally. If both width and ...
If set to zero, the image will be displayed at 72 dots per inch. The recognized formats
JPEG, PNG, GIF, and WMF. For JPEG, the following types are supported: Grayscale,
true color (24 bits), and CMYK (32 bits). The following formats are supported for PNG
Grayscale of up to 8 bits (256 levels), indexed color, true color (24 bits).
However, it does not support interlacing or the alpha channel. If a transparent color is defined
will be taken into account but will only be interpreted by Acrobat 4 and above.
ImageMask
37
J.Sánchez. wxPdfCOM. Reference Manual
ImportPage
Import a page from the external PDF document. The outline used will be the ArtBox of the
imported page, if it has been defined. If not, the CropBox will be used and if not the
MediaBox. The return value is an index of the imported page that can be used with
UseTemplate(). If the specified page is out of range or has not been selected
source ImportPage() will return zero.
ImportText
Read a text file and print it in the current document. Respect the line breaks.
manuals and automatically inserts the necessary ones if a line is too long. The
text appears justified.
Argumentos Descripción
filename File name to import
Initialize
Define initial values of the document. It is not essential to call this method, but if
It must be done before anyone else. It serves to determine the default orientation.
what the pages will have, the unit of measurement, and the type of paper. In reality, this function does not
It should have the first of its arguments since the orientation should indicate for
each page that is added. This redundancy is due to the fact that wxPdfCOM does not support
empty arguments may disappear in future versions where presumably
the default arguments are to be introduced.
The supported paper types are the same as wxWidgets. Currently, there are 116 types.
different ones to choose the one that best meets our needs without being
It is possible to create different sizes than these. If the call to Initialize is omitted, the document
It will be A4 size.
Argumentos Descripción
orientation Default orientation type
38
J. Sanchez. wxPdfCOM. Reference Manual
Lin
Draw a line between two points. Line takes into account the established values for width.
of line and color. Do not confuse with Ln() which is used to create line breaks.
Line Count
Calculate the number of lines that a text would occupy considering the available width.
and the current font size.
Argumentos Descripción
w Available width
text Text for which the calculation is desired
Ln
See: Cell();
Argumentos Descripción
h Height of the jump, if it is zero take the height of the last cell
Marker
Draw a mark.
Argumentos Descripción
x Abscissa of the center of the mark
y Ordered from the center of the brand
markerType One of the types from the following table
size Brand size
PDF_MARKER_CIRCLE
39
J.Sánchez. wxPdfCOM. Reference manual
PDF_MARKER_SQUARE
PDF_MARKER_TRIANGLE_UP
PDF_MARKER_TRIANGLE_DOWN
PDF_MARKER_TRIANGLE_LEFT
PDF_MARKER_TRIANGLE_RIGHT
PDF_MARKER_MARKER_DIAMOND
PDF_MARKER_PENTAGON_UP
PDF_MARKER_PENTAGON_DOWN
PDF_MARKER_PENTAGON_LEFT
PDF_MARKER_PENTAGON_RIGHT
PDF_MARKER_STAR
PDF_MARKER_STAR4
PDF_MARKER_PLUS
PDF_MARKER_CROSS
PDF_MARKER_SUN
PDF_MARKER_BOWTIE_HORIZONTAL
PDF_MARKER_BOWTIE_VERTICAL
PDF_MARKER_MARKER_ASTERISK
MirrorH
MirrorV
MoveTo
It jumps the drawing pointer to a new position. This must be the first operation.
after ClippingPath().
Argumentos Descripción
x Abscissa of the new position
y Ordered from the new position
40
J.Sánchez. wxPdfCOM. Reference Manual
MultiCell
This method allows printing text with line breaks. These will be inserted
automatically as soon as the text reaches the right edge of the cell, or manually.
The necessary cells will be drawn, one beneath the other. The text can appear
aligned justified or centered. You can specify a border and a padding.
Argumentos Descripción
w Cell width. Zero means to the end of the line
border Define the cell border type according to the Border table.
It serves to indicate the position of the writing pointer after
ln
Cell
0: Next
2: Below
align Set the alignment for the text according to the align table
fill Filling
41
J.Sánchez. wxPdfCOM. Reference manual
OpenPdf
This method starts the generation of a PDF document. OpenPdf() does not create any pages.
AddPage() automatically invokes the internal Open() method if necessary.
See: AliasNbPages()
Polygon
y Ordered array
PushButton
Add a button to the page in the current position. The button is included in the field list.
from the form (acroform), a snippet of JavaScript can be included as an action
of the button.
42
J. Sanchez. wxPdfCOM. Reference Manual
Argumentos Descripción
name Field name
RadioButton
Rect
Draw a rectangle. The outline and fill are optional. Take the values into account.
of established color and line width.
w Width
h Height
43
J. Sánchez. wxPdfCOM. Reference Manual
Regular Polygon
ns Number of sides
Rotate
RotatedImage
Show an image with rotation. You need to specify the origin coordinates of the
image shown. The dimensions can be explicit or calculated just like happens
with Image(). It supports common formats (JPG, PNG, GIF, BMP, and WMF). The type of
image is automatically inferred from the file extensions. The image may
serve as a link. Just like with Image(), the images used multiple
sometimes in the same PDF file, they are only stored once to save space.
44
J. Sánchez. wxPdfCOM. Reference manual
See:Image()
Argumentos Descripción
x X-coordinate of the upper left corner
link Link
RotatedText
RoundedRect
Draw a rectangle with rounded corners. In the selection of the corners that you
They are going to draw rounded shapes; the values can be summed to obtain results.
intermediate. This way, it is not necessary to curve just one corner (or all of them), but rather
You can draw rectangles with two or three rounded corners.
Argumentos Descripción
x Abscissa of the top left corner
r Corner radius
45
J. Sánchez. wxPdfCOM. Reference Manual
Save As File
See Close()
Argumentos Descripción
name File name. An empty string is equivalent to '[Link]'
Scale
46
J. Sánchez. wxPdfCOM. Reference Manual
ScaleX
ScaleXY
ScaleY
Sector
Draw a sector
Argumentos Descripción
x0 Abscissa of the central point.
r Radio
47
J.Sánchez. wxPdfCOM. Reference Manual
style Style
0: At three
90 : At twelve
180: At 9
270: At 6
SetAlpha
Set the values for Alpha and BlendMode. Return an identifier for later use.
use.
Argumentos Descripción
Alpha value for strokes. It is a value between
lineAlpha
zero (transparent) and 1 (opaque)
Alpha value for filling. It is a value between
fillAlpha
zero (transparent) and 1 (opaque)
Value for BlendMode. One of the constants.
blend mode
next:
PDF_BLENDMODE_NORMAL
PDF_BLENDMODE_MULTIPLY
PDF_BLENDMODE_SCREEN
PDF_BLENDMODE_OVERLAY
PDF_BLENDMODE_DARKEN
PDF_BLENDMODE_LIGHTEN
48
J. Sánchez. wxPdfCOM. Reference Manual
PDF_BLENDMODE_COLORDODGE
PDF_BLENDMODE_COLORBURN
PDF_BLENDMODE_HARDLIGHT
PDF_BLENDMODE_SOFTLIGHT
PDF_BLENDMODE_DIFFERENCE
PDF_BLENDMODE_EXCLUSION
PDF_BLENDMODE_HUE
PDF_BLENDMODE_SATURATION
PDF_BLENDMODE_COLOR
PDF_BLENDMODE_LUMINOSITY
SetAlphaState
SetAuthor
SetAutoPageBreak
49
J.Sánchez. wxPdfCOM. Reference Manual
SetCellMargin
Define the margin for the cells. It can be called before creating the first page.
Argumentos Descripción
margin Value of the margin
SetCompression
SetCreator
Define the creator of the document. It is usual to put the name of the application that created it.
the document. In the freeware versions of wxPdfCOM, the default value is
'wxPdfCOM' cannot be changed with SetCreator().
SetDisplayMode
Define how the document should be displayed in the viewer. It can be established the
initial zoom level to one of the preset levels, to a precise factor or let the
set the default level. (In Acrobat, the default zoom can be chosen in
the 'Preferences' menu). Page settings can also be specified. The mode
By default, it is full screen and continuous.
Argumentos Descripción
zoom Type of zoom. One of the following
50
J.Sánchez. wxPdfCOM. Reference manual
PDF_CONTINUOUS_LAYOUT
PDF_LAYOUT_TWO
PDF_LAYOUT_DEFAULT
zoomFactor If zoom is PDF_ZOOM_FACTOR the percentage of
zoom will be about this argument
SetDrawColor
Define the color used for drawing operations. The affected operations are the
lines, rectangles, and cell borders. The color is expressed by the combination of the
red, green, and blue colors (RGB). The method can be invoked before creating the first
the page and its value are preserved for all pages or until it is changed.
See SetFillColor(), SetTextColor(), Line(), Rect(), Cell(), MultiCell()
Argumentos Descripción
red Red level. It is a value between 0 and 255
SetFillColor
Define the color for fill operations. The operations where filling is used.
they are the rectangles with the fill option activated, the backgrounds of the cells, etc. It is possible to
establish before creating the first page and the value is retained for all pages or
until it is reestablished with SetFillColor().
51
J. Sánchez. wxPdfCOM. Reference Manual
SetFillGradient
Draw a rectangular area with gradient.
Argumentos Descripción
Abscissa of the top left corner of the
x
rectangle
h Height
SetFont
The 'family' argument can be an empty string. In that case, the current family is retained.
and only the other arguments are taken into account. We can use SetFont() to change the
font size although it is more direct to do it with SetFontSize() if it is the size
the only thing we want to change. Style options can be combined to achieve
combined effects. In symbolic fonts, the 'Bold' and 'Italics' styles have no effect.
'Itálica'. In size, you can set it to zero, in which case the previously set size will be retained.
established at 12, (the default value), if it has not been specified at any time.
Arguments Description
family Font family. standard of those that are
they show or a defined one with AddFont()
Courier (fixed width)
Times (serif)
52
J.Sánchez. wxPdfCOM. Reference Manual
Symbol (symbols)
ZapfDingbats (symbols)
style
Font style
B: Bold)
I: Italica
BI or IB: Bold/Italic
U: Underlined
size
Font size in points.
SetFontPath
SetFontSize
See SetFont()
Argumentos Descripción
size Font size defined in points
Set the font inclusion mode. If a PDF document uses additional fonts
to the 14 standard basic sources, the information from the
the same. The result is that the documents increase considerably in size,
especially if Unicode fonts are used, which often include thousands of symbols.
53
J. Sánchez. wxPdfCOM. Reference Manual
To reduce the size of these files, only the characters that can be included
utilicen en el documento. SetFontSubsetting() sirve precisamente para activar o desactivar
this option only works for TrueType Unicode fonts.
Argumentos Descripción
Enable/disable partial inclusion of Truetype fonts
font subsetting
Unicode
SetFormBorderStyle
Set the border style of the form fields. The thickness and the can be modified.
style of all fields included until a new call to
SetFormBorderStyle() with different values.
Argumentos Descripción
borderStyle Style of the border of form fields
PDF_BORDER_SOLID
PDF_BORDER_DASHED
Beveled Border
PDF_BORDER_INSET
PDF_BORDER_UNDERLINE
SetFormColors
Set the colors of the form fields. Define one color for the border, another for
the background and a color for the text. The three colors are expressed in RGB.
Argumentos Descripción
Red component for the edge. It is a value.
BRed between 0 and 255
Green component for the edge. It is a value.
BGreen between 0 and 255
Blue component for the edge. It is a value
BBlue between 0 and 255
Red component for the background. It is a value.
BKRed between 0 and 255
Green component for the background. It is a value
BKGreen between 0 and 255
Blue component for the background. It is a value.
BKBlue between 0 and 255
Red component for the text. It's a value.
TRed between 0 and 255
54
J. Sánchez. wxPdfCOM. Reference Manual
SetImageScale
Set the image scale
Argumentos Descripción
scale Image scale
SetKeywords
Associate a series of keywords with the document. The keywords are a clue about the
content of the document, just as happens with the keywords of .html files.
Internet search engines usually read these words to classify pages based on their
content. The argument is a string of characters that contains several words separated
through spaces.
SetLeftMargin
Define the left margin. This method can be called before creating the first page.
If the current value of X falls outside the margin, its value is automatically adjusted.
SetLineHeight
SetLineWidth
Define the line width. By default, the line width is 0.2 mm. The line width is
it can be set before creating the first page and is retained for the following ones.
55
J.Sánchez. wxPdfCOM. Reference manual
Argumentos Descripción
width Line width value
SetLink
SetMargins
Define the top, left, and right margins. The default value for the margins.
It is 1 cm. To modify the bottom margin, use the SetAutoPageBreak() method.
SetProtection
Define the permissions that the document will have. Set the user and owner passwords.
If this function is not used, the document will have all permissions except for
modification. In case of using it, it will only have the permissions that are expressly activated.
It is not necessary to set the user and owner keys. If you specify a key for
the viewer, (Acrobat), will ask for it to open the document.
If you specify an owner key, it will be used to open the document without
restrictions. When choosing a length for the key, keep in mind that the value for
default (if you set zero) you will adopt the standard method, revision 2 with a length of 40 bits.
If you set a value greater than zero, you will adopt the standard method, revision 3 with the length.
de clave dada, pero ten en cuenta que esta deberá estar entre 40 y 128 y además ser
multiple of 8. Otherwise, its length will adjust to these conditions. When it comes to
establish encryption keys, noting that Acrobat only supports 40 and 128 keys
bits.
permissions Code to activate the permissions. (+) Argument
accumulative
56
J. Sánchez. wxPdfCOM. Reference Manual
PDF_PERMISSION_NONE
+ PDF_PERMISSION_PRINT
+ PDF_PERMISSION_MODIFY
+ PDF_PERMISSION_COPY
+ PDF_PERMISSION_ANNOT
PDF_PERMISSION_ALL
userPassword User key
ownerPassword Owner key
encryptionMethod Encryption method
PDF_ENCRYPTION_RC4V1
PDF_ENCRYPTION_RC4V2
PDF_ENCRYPTION_AESV2
keyLength Key length
Define the right margin. This method can be called before creating the first page.
SetSourceFile
SetSubject
57
J.Sánchez. wxPdfCOM. Reference Manual
SetTemplateBBox
Define the visible sector of a model. It will be a rectangular area. The model will be loaded.
complete, but we can define which part will be visible in our document.
SetTextColor
Define the color used to display text. It will be expressed in RGB components. It may
establish before the creation of the first page and its value will be remembered for the rest
from the document.
SetTitle
SetTopMargin
58
J. Sánchez. wxPdfCOM. Reference Manual
Define the upper margin. This method can be called before creating the first page and
it retains its value until new changes.
SetX
Define the abscissa of the current position. If the value of the argument is negative, it is understood
referred to the far right of the page.
SetXY
Define the abscissa and the ordinate of the current position. If the value of x is negative, it
understood in relation to the far right of the page. If the value of y is negative, it will be understood
related to the bottom edge of the page.
SetY
Move the x-axis to the left margin and adjust the y-axis to the value of the argument. If the
the value of y is negative, understood relative to the bottom part of the page.
Shape
Draw a shape that has been defined. The identifier of a shape is the name.
assigned during its definition.
Argumentos Descripción
shape Name assigned to the form
59
J. Sánchez. wxPdfCOM. Reference Manual
+ PDF_STYLE_FILL
+ PDF_STYLE_FILLDRAW
ShapeCurveTo
Add a Bezier curve to a shape. The curve extends from the current position to
the point (x3,y3) using (x1,y1) and (x2,y2) as control points. The position of
The pointer of the shape is located at the point (x3,y3).
Argumentos Descripción
name Assigned name to the form
ShapedText
60
J. Sánchez. wxPdfCOM. Reference manual
PDF_SHAPEDTEXTMODE_ONETIME : Once
PDF_SHAPEDTEXTMODE_STRETCHTOFIT
Stretched along the shape
:
PDF_SHAPEDTEXTMODE_REPEAT : Repeated
ShapeLineto
Add a line to a shape. The line starts from the current position of the shape to the
Supplied point. The current position of the shape moves to the new point.
Argumentos Descripción
shape Name of a Shape object (New or existing)
ShapeMoveto
Define a new point for a shape. If the shape has not been defined previously, it
it will be created with the given name in this function and this point will be set as the starting point of the new one
shape.
Argumentos Descripción
shape Name of a Shape object (New or existing)
Scale
Modify the scale in the X and Y directions. The transformation is applied in a way
independent for each dimension.
Argumentos Descripción
sx Width scaling factor. Zero is not allowed.
61
J.Sánchez. wxPdfCOM. Reference Manual
Skew
SkewX
SkewY
StartTransform
See: StopTransform().
StopTransform
62
J. Sánchez. wxPdfCOM. Reference Manual
Leave the transformation context. Restore the saved graphic values with the
last call to StartTransform(). This method must be invoked to cancel an environment
transformation started with StartTransform. All transformation environments are
They implicitly close with the end of the page. No arguments needed.
Text
Print a string of characters at an exact location. The supplied point will determine the
left base of the first character of the string. The other functions to print text
Cell(), MultiCell() or Write() are more powerful and effective, so it is recommended to use them.
Text() only when it is necessary to precisely control the insertion point of it.
TextBox
This method counts the number of lines that the text occupies for a maximum width.
Argumentos Descripción
w Cell width. If it is zero, it takes the entire available width
h Cell height
PDF_ALIGN_LEFT
halign
PDF_ALIGN_CENTER
PDF_ALIGN_RIGHT
PDF_ALIGN_JUSTIFY
Control the vertical alignment. Accepts the following values
PDF_ALIGN_TOP
valign
ALIGN_MIDDLE
PDF_ALIGN_BOTTOM
Indicate which edges will be drawn. Accept the values.
next.((+)Cumulative)
border PDF_BORDER_NONE
PDF_BORDER_LEFT
+ PDF_BORDER_RIGHT
63
J. Sánchez. wxPdfCOM. Reference Manual
+ PDF_BORDER_TOP
+ PDF_BORDER_BOTTOM
PDF_BORDER_FRAME
fill Valor lógico de relleno. 1 Verdadero, 0 Falso
TextField
Add a text field in the current position. The field will be part of the Acroform.
Argumentos Descripción
name Field name
Translate
TranslateX
TranslateY
UnsetClipping
Remove the mask area. After working with masks, they need to be removed with a
call to UnsetClipping(). It has no arguments.
64
J.Sánchez. wxPdfCOM. Reference Manual
Use Template
width Width
height High
Write
Print text at the current position. When the right margin is reached or found
with a newline character ( ), Write jumps to the beginning of the next line. It can be
create a link with Write. The position is fixed at the end of the displayed text.
link Link
WriteCell
This method prints text with cell attributes at the current position. It causes a jump of
line when the right margin is reached or the character is found. The printing
continue on the right margin of the next line. after displaying the text the position
It is established at the end of it. A link can be created.
65
J.Sánchez. wxPdfCOM. Reference manual
WriteXML
66
J. Sánchez. wxPdfCOM. Reference Manual
Annexes
67
J.Sánchez. wxPdfCOM. Reference manual
68
J. Sánchez. wxPdfCOM. Reference manual
69
J.Sánchez. wxPdfCOM. Reference manual
70
J. Sánchez. wxPdfCOM. Reference Manual
SetLink Define the page and the position to which a link points.
71
J.Sánchez. wxPdfCOM. Reference Manual
SetXY Define the abscissa and the ordinate of the current position
Move the x-axis to the left margin and adjust the y-axis.
SetY to the value of the argument
72
J.Sánchez. wxPdfCOM. Reference manual
73
J.Sánchez. wxPdfCOM. Reference Manual
Tables
Alignment options
PDF_ALIGN_LEFT 0
PDF_ALIGN_CENTER 1
PDF_ALIGN_RIGHT 2
PDF_ALIGN_JUSTIFY 3
PDF_ALIGN_TOP 0
PDF_ALIGN_MIDDLE 1
PDF_ALIGN_BOTTOM 2
Style options
PDF_STYLE_NOOP 0
PDF_STYLE_DRAW 1
PDF_STYLE_FILL 2
PDF_STYLE_FILLDRAW 3
PDF_STYLE_DRAWCLOSE 4
PDF_STYLE_MASK 7
74
J. Sánchez. wxPdfCOM. Reference Manual
PDF_MARKER_PENTAGON_UP 7
PDF_MARKER_PENTAGON_DOWN 8
PDF_MARKER_PENTAGON_LEFT 9
PDF_MARKER_PENTAGON_RIGHT 10
PDF_MARKER_STAR 11
PDF_MARKER_STAR4 12
PDF_MARKER_PLUS 13
PDF_MARKER_CROSS 14
PDF_MARKER_SUN 15
PDF_MARKER_BOWTIE_HORIZONTAL 16
PDF_MARKER_BOWTIE_VERTICAL 17
PDF_MARKER_MARKER_ASTERISK 18
PDF_MARKER_MARKER_LAST 19
Zoom Values
PDF_ZOOM_FULLPAGE 0
PDF_ZOOM_FULLWIDTH 1
PDF_ZOOM_REAL 2
PDF_ZOOM_DEFAULT 3
PDF_ZOOM_FACTOR 4
75
J. Sánchez. wxPdfCOM. Reference manual
Encryption methods
PDF_ENCRYPTION_RC4V1 0
PDF_ENCRYPTION_RC4V2 1
PDF_ENCRYPTION_AESV2 2
Types of paper
PAPER_NONE 0 Undefined
PAPER_LETTER 1 Letter, 8 1/2 x 11 inches
LEGAL_DOCUMENT 2 Legal, 8 1/2 x 14 inches
A4 PAPER 3 A4 sheets, 210 x 297 millimeters
PAPER_CSHEET 4 C Folio, 17 x 22 inches
PAPER_DSHEET 5 D Folio, 22 x 34 inches
PAPER_ESHEET 6 E Folio, 34 x 44 inches
PAPER_LETTERSMALL 7 Small letter, 8 1/2 x 11 inches
PAPER_TABLOID 8 Tabloid, 11 x 17 inches
PAPER_LEDGER 9 Ledger, 17 x 11 inches
PAPER STATEMENT 10 Statement, 5 1/2 x 8 1/2 inches
PAPER_EXECUTIVE 11 Executive, 7 1/4 x 10 1/2 inches
PAPER_A3 12 A3 Folio, 297 x 420 millimeters
PAPER_A4SMALL 13 A4 small Folio, 210 x 297 millimeters
PAPER_A5 14 A5 Folio, 148 x 210 millimeters
PAPER_B4 15 B4 Folio, 250 x 354 millimeters
PAPER_B5 16 B5 Folio, 182 x 257 millimeters
PAPER_FOLIO 17 Folio, 8 1/2 x 13 inches
QUARTO PAPER 18 quarto, 215x275 millimeters
PAPER_10X14 19 Folio 10 x 14 inches
PAPER_11X17 20 sheets 11 x 17 inches
PAPER_NOTE 21 Note, 8 1/2 x 11 inches
PAPER_ENV_9 22 About #9, 3 7/8 x 8 7/8 inches
PAPER_ENV_10 23 On #10, 4 1/8 x 9 1/2 inches
PAPER_ENV_11 24 On #11, 4 1/2 x 10 3/8 inches
PAPER_ENV_12 25 About #12, 4 3/4 x 11 inches
PAPER_ENV_14 26 About '#14, 5 x 11 1/2 inches
PAPER_ENV_DL 27 On DL, 110 x 220 millimeters
PAPER_ENV_C5 28 On C5, 162 x 229 millimeters
PAPER_ENV_C3 29 On C3, 324 x 458 millimeters
PAPER_ENV_C4 30 On C4, 229 x 324 millimeters
76
J. Sánchez. wxPdfCOM. Reference Manual
77
J. Sánchez. wxPdfCOM. Reference Manual
78
J. Sánchez. wxPdfCOM. Reference Manual
Introduction
FPDF......................................................................................................................................2
COM.......................................................................................................................................4
Advantages and disadvantages
Setting up the environment......................................................................................................6
Register the component.....................................................................................................6
Constants file ......................................................................................................... 7
Declarando variables...........................................................................................................7
Assigning memory.............................................................................................................8
Communicating with wxPdfCOM...........................................................................................8
User Manual...............................................................................................................9
General considerations
Passing of arguments............................................................................................................9
Passing arrays......................................................................................................................9
Cumulative arguments.................................................................................................10
Define the document format.....................................................................................12
Document properties.............................................................................................12
Headers and footers.............................................................................................12
Print texts....................................................................................................................13
Graphics................................................................................................................................17
Reference of instructions ..................................................................................21
Annexes ..............................................................................67
Alphabetical list of instructions.................................67
Tables 74
Index ………………………………………………………………………79
79