DynaPDF Manual - Page 684

Previous Page 683   Index   Next Page 685

Function Reference
Page 684 of 839
A reply contains usually a comment or text from a user. This string can be set with SetAnnotString()
(the string Content must be set).
Example (C++):
SI32 annot, reply;
PPDF* pdf = pdfNewPDF();
if (!pdf) return -1;
pdfCreateNewPDF(pdf, "out.pdf");
pdfSetPageCoords(pdf, pcTopDown);
pdfAppend(pdf);
annot = pdfSquareAnnot(pdf, 50.0, 50.0, 200.0, 100.0, 1.0, NO_COLOR,
255, csDeviceRGB, "Jim", "Test", "Just test...");
reply = pdfSetAnnotMigrationState(pdf, annot, asCreateReply, "Harry");
pdfSetAnnotString(pdf, reply, asContent, "This is a reply!");
pdfEndPage(pdf);
pdfCloseFile(pdf);
pdfDeletePDF(pdf);
Remarks:
This function is implemented in an Ansi and Unicode compatible variant. A migration state or
annotation reply is defined since PDF 1.5. The function adjusts the PDF version automatically if it is
lower than PDF 1.5.
Return values:
If the function succeeds the return value is the handle of the text annotation, a value greater or equal
zero. If the function fails the return value is a negative error code.
SetAnnotOpacity
Syntax:
LBOOL pdfSetAnnotOpacity(
const PPDF* IPDF, // Instance pointer
UI32 Handle,
// Annotation handle
double Value)
// New value must be in the range 0.0..1.0.
The function changes the opacity of a markup annotation. The function GetAnnotEx() or
GetPageAnnotEx() can be used to determine whether an annotation is a markup annotation.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetAnnotLineDashPattern, SetAnnotMigrationState

Next topic: SetAnnotOpenState, SetAnnotOrFieldDate