SaveToString

Document management

Description

Similar to the SaveToFile function, but instead of creating a file the data for the PDF file is returned as a string.

Syntax

Delphi

Function TPDFlib.SaveToString: AnsiString;

DLL

const char* DLSaveToString(int InstanceID);

Return values

Returns the complete PDF document as a string of bytes. Returns an empty string when saving fails, for example when content written above a locked save version is detected (LastErrorCode 602); inspect LastErrorCode for the reason.

Remarks

The selected font, text size, colours, line settings and content layer are the same after the save as before it, so drawing can continue on the selected page without choosing them again