DynaPDF Manual - Page 448
Previous Page 447 Index Next Page 449
Function Reference
Page 448 of 839
pdfSetFillColor(PDF, PDF_RED);
pdfWriteText(PDF,
pdfGetLastTextPosX(PDF),
pdfGetLastTextPosY(PDF),
"We are behind the last text line");
pdfRestoreGraphicState(PDF);
pdfEndPage(PDF);
Example 3 (WriteAngleText()):
pdfSetPageCoords(PDF, pcTopDown);
pdfAppend(PDF);
pdfSetFont(PDF, "Times", fsItalic, 20.0, true, cp1252);
/*
WriteAngleText() calculates the absolute end point measured in bottom-
up coordinates. Note that the font origin is taken into account. As
long as no further coordinate transformations are applied the
coordinates are directly usable with exception that we must transform
the y-coordinate to top down coordinates in this example.
*/
pdfWriteAngleText(PDF, "Some text...,", 10.0, 150.0, 150.0, 0.0, 0.0);
pdfSetFillColor(PDF, PDF_RED);
pdfWriteText(PDF,
pdfGetLastTextPosX(PDF),
pdfGetPageHeight(PDF)-pdfGetLastTextPosY(PDF),
"We are behind the last text line");
pdfEndPage(PDF);
GetLaunchAction
Syntax:
LBOOL pdfGetLaunchAction(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Action handle
struct TPDFLaunchAction* Action) // see below
struct TPDFLaunchAction
{
UI32
StructSize;
// Must be set to sizeof(TPDFLaunchAction).
const char* AppName;
// Optional. The name of the app that should be launched.
const char* DefDir;
// Optional default directory.
IFSR*
File;
// see GetFileSpec().
SI32
NewWindow;
// -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.
const char* Operation;
// Optional. The operation to perform (open or print).
const char* Parameter;
// Optional parameter that shall be passed to the app.
};
The function retrieves the properties of a launch action. The member StructSize must be set to
sizeof(TPDFLaunchAction) before the function can be called.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: GetLastTextPosX, GetLastTextPosY
Next topic: GetLayerConfig, GetLayerConfigCount