Sets the file options used by LEADTOOLS when loading XPS files.
#include "l_bitmap.h"
L_LTFIL_API L_INT EXT_FUNCTION L_SetXPSOptions(pOptions)
Pointer to a structure that contains the options to use when loading XPS files
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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.
Win32, x64.
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.