ISvgResourceKeeperCallback

The svg callback interface

Methods

MethodDescription
onImageResourceReady(byte[] imageData, int imageType, String suggestedFileName, boolean[] useEmbeddedImage)Called for each raster image in SVG. Use it to specify how to store the raster image.
onFontResourceReady(FontStoringArgs args)Called for each font used in SVG. Use it to specify how to store the font.
onSvgDocumentReady(byte[] htmlData, String suggestedFileName)Called when SVG document is ready.

onImageResourceReady(byte[] imageData, int imageType, String suggestedFileName, boolean[] useEmbeddedImage)

String onImageResourceReady(byte[] imageData, int imageType, String suggestedFileName, boolean[] useEmbeddedImage)

Called for each raster image in SVG. Use it to specify how to store the raster image.

Parameters:

ParameterTypeDescription
imageDatabyte[]The bytes of the raster image content
imageTypeintType of the image.
suggestedFileNameStringName of the suggested file.
useEmbeddedImageboolean[]if set to true then image will be embedded into SVG.

Returns: String - Should return path to saved resource. Path will be used in SVG image to refer to raster content. Path should be relative to target SVG document.

onFontResourceReady(FontStoringArgs args)

void onFontResourceReady(FontStoringArgs args)

Called for each font used in SVG. Use it to specify how to store the font.

Parameters:

ParameterTypeDescription
argsFontStoringArgsThe font storage parameters

onSvgDocumentReady(byte[] htmlData, String suggestedFileName)

String onSvgDocumentReady(byte[] htmlData, String suggestedFileName)

Called when SVG document is ready.

Parameters:

ParameterTypeDescription
htmlDatabyte[]The SVG document conent bytes.
suggestedFileNameStringSuggested name for the file.

Returns: String - Should return path to saved svg document.