Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 606

Previous Page 605   Index   Next Page 607

Function Reference
Page 606 of 750
SI32 pdfSetAnnotMigrationState(
const PPDF* IPDF,
// Instance pointer
UI32 Annot,
// Handle of a markup annotation
TAnnotState State, // See below
const char* User)
// The user who sets the state
typedef enum
The function adds a migration state or a reply to a markup annotation. All annotation types with
exception of 3D, Link, Movie, Screen, PrinterMark, TrapNet, and Watermark are markup
Migration states are stored in text annotations as reply to the base annotation. Further states are
stored as reply to the last reply and so on; the result is a single linked list. Because the base
annotation contains no reference to the last reply or migration state the function must search for it.
To speed up processing the function returns the handle of the text annotation so that the next state
can directly be added to this annotation. This handle is also required if a reply should be created.
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);
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!");
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.

Previous topic: SetAnnotLineDashPattern

Next topic: SetAnnotOpenState