Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
#include "l_bitmap.h"
L_LTFIL_API L_INT EXT_FUNCTION L_SetXPSOptions(pOptions)
pFILEXPSOPTIONS pOptions; |
/* pointer to a structure */ |
Sets the file options used by LEADTOOLS when loading XPS files.
Parameter |
Description |
pOptions |
Pointer to a structure that contains the options to use when loading XPS files |
Returns
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
LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
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; }