L_SetXPSOptions

#include "l_bitmap.h"

L_LTFIL_API L_INT EXT_FUNCTION L_SetXPSOptions(pOptions)

Sets the file options used by LEADTOOLS when loading XPS files.

Parameters

pFILEXPSOPTIONS pOptions

Pointer to a structure that contains the options to use when loading XPS files

Returns

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

Comments

The uStructSize member of the FILEXPSOPTIONS structure must be set before calling this function.

To get the current options used when loading an XPS file, call L_GetXPSOptions.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT SetXPSOptionsExample(L_TCHAR * pszxpsFileName, 
                            pBITMAPHANDLE pBitmap)  
{ 
   L_INT nRet;  
   FILEXPSOPTIONS xpsOptions;  
   RASTERIZEDOCOPTIONS RasterizeOptions; 
 
   /* Get the current XPS option */ 
   nRet = L_GetXPSOptions(&xpsOptions,sizeof(FILEXPSOPTIONS));  
   if(nRet != SUCCESS)  
      return nRet;  
 
   /* Currently the XPFILEOPTIONS does not contain any extra values */ 
 
   /* Set new XPS options */ 
   nRet = L_SetXPSOptions(&xpsOptions);  
   if(nRet != SUCCESS)  
      return nRet;  
 
   /* Change the resolution to 120 by 120 */ 
   nRet = L_GetRasterizeDocOptions(&RasterizeOptions, sizeof(RasterizeOptions)); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   RasterizeOptions.uXResolution = 120; 
   RasterizeOptions.uYResolution = 120; 
 
   /* Set new Rasterize document options */ 
   nRet = L_SetRasterizeDocOptions(&RasterizeOptions); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Now load the XPS file */ 
   nRet = L_LoadBitmap(pszxpsFileName, pBitmap, sizeof(BITMAPHANDLE), 0, ORDER_RGB, NULL, NULL);  
   if(nRet != SUCCESS)  
      return nRet;  
   return SUCCESS;  
} 
Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help