Hi,
Just by looking at the function names, you'd think these functions are setter and getter for the same thing. They're quite different, and they're declared in different header files.
In fpdf_edit.h:
// Set the text for a textobject. If it had text, it will be replaced.
PDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFText_SetText(FPDF_PAGEOBJECT text_object, FPDF_WIDESTRING text);
In fpdf_text.h:
// Extract unicode text string from the page.
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText(FPDF_TEXTPAGE text_page,
int start_index,
int count,
unsigned short* result);
Is there a way to get the text of a text object? That is, something like this:
// Extract unicode text string from a text object.
FPDF_EXPORT int FPDF_CALLCONV FPDFTextObj_GetText(FPDF_PAGEOBJECT text_object,
unsigned short* result);