L_SvgSaveDocumentMemory

Summary

Saves the specified SVG document to a file in memory.

Syntax

#include "l_bitmap.h"

L_LTSVG_API L_INT L_SvgSaveDocumentMemory(docHandle, buffer, bufferSize, options)

Parameters

const L_SvgNodeHandle docHandle

Handle that holds the SVG document data.

L_UCHAR** buffer

Address of a pointer that will be allocated by this function and filled with the output SVG file in memory.
When this memory is no longer needed, you must free it using L_SvgFreeMemory.

L_UINT* bufferSize

Pointer to a variable that will be updated with the size of the output buffer allocated by this function.

const L_SvgSaveOptions* options

Pointer to optional save options. Pass NULL to use the default save options.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

To use this function, do the following:

  1. Declare a variable of type L_SvgNodeHandle. You can then pass its address in this function, which will allocate the memory, save the SVG file, and unlock the memory. Set the value of the L_SvgNodeHandle to NULL.
  2. Declare a L_UINT variable for the file-size. You can then pass its address in this function, which will update its value with the size of the file.
  3. Call this function to save the SVG document in the specified memory handle.
  4. When the memory allocated by this function is no longer needed, you must free it using L_SvgFreeMemory.

This function will save the specified SVG document to the output file as a standard SVG document.

Support for SVG is only available in the Document and Medical Imaging toolkits.

When the memory allocated by this function is no longer needed, you must free it using L_SvgFreeMemory.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

For an example, refer to L_SvgLoadDocumentMemory.

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS SVG C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.