SetHTMLImage

Text, HTML text, Image handling

Description

Binds a loaded image to the src value used by HTML <img> elements

Syntax

Delphi

Function TPDFlib.SetHTMLImage(Const Source: WideString; ImageID: Integer): Integer;

ActiveX

Function PDFlib::SetHTMLImage(Source As String, ImageID As Long) As Long

DLL

int DLSetHTMLImage(int InstanceID, const wchar_t* Source, int ImageID);

Parameters

SourceNon-empty source name matched against the HTML src attribute
ImageIDImage handle owned by the selected document

Return values

Returns 1 when the source and image are valid for the selected document, or 0 otherwise

Remarks

Binding replaces an earlier mapping with the same source and never performs network or file I/O during HTML measurement

Repeated HTML use registers and draws the same image XObject instead of decoding another image

See also

ClearHTMLImages, DrawHTMLText, Appendix A