L_SvgSetFlatDocument

#include "l_bitmap.h"

L_LTSVG_API L_INT L_SvgSetFlatDocument(docHandle, flatDoc)

Sets the flat flag of the specified SVG document.

Parameters

L_SvgNodeHandle docHandle

The SVG document handle referencing the SVG document to be updated.

L_BOOL flatDoc

TRUE to force the flat-state of the SVG document; FALSE to clear it.

Returns

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

Comments

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

For more information on flat SVG documents and bounds and resolution, refer to SVG Size, Bounds and Flat.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

This example loads a PDF file as SVG and then sets the flat flag of the specified document to true.

L_INT SvgSetFlatDocumentExample(L_VOID) 
{ 
   L_INT nRet = ERROR_FILE_FORMAT; 
 
   LOADSVGOPTIONS options; 
   memset(&options, 0, sizeof(LOADSVGOPTIONS)); 
   options.uStructSize = sizeof(LOADSVGOPTIONS); 
   options.uFlags = L_LOADSVGOPTIONS_NONE; 
   options.SvgHandle = NULL; 
 
   /* Load the document as SVG */ 
   L_TCHAR filename[L_MAXPATH] = MAKE_IMAGE_PATH(TEXT("Leadtools.pdf")); 
 
   L_BOOL canLoad = FALSE; 
   nRet = L_CanLoadSvg(filename, &canLoad, NULL); 
   if (canLoad) 
   { 
      nRet = L_LoadSvg(filename, &options, NULL); 
      if (nRet != SUCCESS) 
         return nRet; 
 
      nRet = L_SvgSetFlatDocument(options.SvgHandle, L_TRUE); 
 
      L_SvgFreeNode(options.SvgHandle); 
   } 
 
   return nRet; 
} 

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

LEADTOOLS SVG C API Help