DynaPDF Manual - Page 426
Previous Page 425 Index Next Page 427
Function Reference
Page 426 of 839
scale
= fontSize / 1000.0;
for (i = 0; i < Len; i++)
{
idx = pdfGetGlyphIndex(PDF, Text[i]);
if ((size = pdfGetGlyphOutline(PDF, idx, NULL)) >= 0)
{
glyph.Size = size;
// Note that size can be zero!
if (size > 0)
glyph.Outline = (TI32Point*)malloc(size * sizeof(TI32Point));
pdfGetGlyphOutline(PDF, idx, &glyph);
// See definition above
DrawGlyph(PDF, x, y + fontSize, fontSize, glyph);
x += glyph.AdvanceX * scale;
if (size > 0) free(glyph.Outline);
}
}
pdfEndPage(PDF);
pdfCloseFile(PDF);
}
GetGoToAction
LBOOL pdfGetGoToAction(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Action handle
struct TPDFGoToAction* Action) // see below
struct TPDFGoToAction
{
UI32
StructSize;
// Must be set to sizeof(TPDFGoToAction).
SI32
DestPage;
// Destination page (the first page is denoted by 1).
float*
DestPos;
// Array of 4 floating point values if set.
TDestType
DestType;
// Destination type.
// GoToR (Go To Remote) actions only:
IFSR*
DestFile;
// see GetFileSpec().
const char* DestNameA;
// Optional named destination that shall be loaded when
// opening the file.
const UI16* DestNameW;
// Either the Ansi or Unicode string is set but never both.
SI32
NewWindow;
// Meaningful only if DestFile points to a PDF file.
// -1 = viewer default, 0 = false, 1 = true.
SI32
NextAction;
// -1 or next action handle to be executed if any.
TActionType NextActionType; // Only set if NextAction is >= 0.
};
The function retrieves the properties of a GoTo or GoTo Remote action. The member StructSize
must be set to sizeof(TPDFGoToAction) before the function can be called. The members DestPos and
DestType are not meaningful for GoTo Remote actions.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: C, C++, Delphi, C#, VB 6, VB .Net, PHP, Outline format
Next topic: GetGoToRAction, GetGStateFlags, GetHideAction