DynaPDF Manual - Page 584

Previous Page 583   Index   Next Page 585

Function Reference
Page 584 of 839
OpenTagBBox
Syntax:
LBOOL pdfOpenTagBBox(
const PPDF* IPDF,
// Instance pointer
TPDFBaseTag Tag,
// The tag that should be created
const char* Lang,
// Optional RFC 3066 laguage identifier
const char* AltText,
// Optional alternate text
const char* Expansion, // Optional expansion of abbrevations or
// acronyms
struct TBBox* BBox)
// Optional bounding box
The function opens a tag in the very same way as OpenTag() but supports the additional parameter
BBox that is required by the tags btFigure and btTable. Since BBox is optional the function can be used
to create all tags. Set BBox to NULL if it is not required. See OpenTag() for further information.
BBox must be defined in the current coordinate system that is used to output the corresponding
contents. All transformations will be taken into account.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is zero.
OpenTagEx
Syntax:
LBOOL pdfOpenTagEx(
const PPDF* IPDF,
TPDFBaseTag Tag,
// The tag that should be created
const char* Lang,
// Optional RFC 3066 laguage identifier
const char* AltText,
// Optional alternate text
const char* Expansion,
// Optional expansion of abbrevations or
// acronyms
const char* Attributes) // Optional. See description below.
The function opens a tag in the very same way as OpenTag() but supports additional parameters
which can be set in a JSON (Javascript Object Notation) like format.
The optional parameter Attributes is a JSON like string. The JSON parser in DynaPDF supports a
few extensions to make the definition of additional attributes as easy as possible. See JSON Parser
for further information.
Examples (C/C++):
const char attr[] = "{/BBox[50, 450, 200, 500]/Placement/Inline}";
// Ok
const char attr[] = "/BBox :[50 450 200 500]/Placement/Inline";
// Ok
const char attr[] = "{{{{/BBox :[50 450 200 500]/Placement/Inline";
// Ok
const char attr[] = "/BBox :[50 450 200 500]/Placement/Inline}}}}";
// Ok
const char attr[] = "\"BBox\":[50 450 200 500]\"Placement\"/Inline"; // Ok
const char attr[] = "/BBox,[50 450 200 500]\"Placement\"/Inline";
// Ok
const char attr[] = "/BBox:[50 450 200 500]/Placement/Inline";
// Ok
 

Previous topic: OpenTag

Next topic: Optimize