#include "l_bitmap.h"
L_LTFIL_API L_INT EXT_FUNCTION L_GetEmfHandleFromRtf (pRtfFileName, nPageNumber, pRtfOptions, pRasterizeDocOptions, hEmfHandle)
Gets an EMF handle from a specific page in RTF file.
Character string that contains the name of the source RTF file.
Number of the RTF page to get its EMF handle. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, etc.
Pointer to a structure that contains the options to be used when loading RTF file. The following options will be used: RTFFILEOPTIONS.crBackColor.
Pointer to a structure that contains the options to be used when rasterizing document files. The following options will be used: RASTERIZEDOCOPTIONS.uXResolution, RASTERIZEDOCOPTIONS.uYResolution, RASTERIZEDOCOPTIONS.dPageHeight, RASTERIZEDOCOPTIONS.dPageWidth, RASTERIZEDOCOPTIONS.dLeftMargin, RASTERIZEDOCOPTIONS.dTopMargin, RASTERIZEDOCOPTIONS.dRightMargin and RASTERIZEDOCOPTIONS.dBottomMargin
Address of an Enhanced Metafile (EMF) handle that will be updated with the obtained EMF.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The number of RTF pages depends on page settings values inside pRasterizeDocOptions
.
Required DLLs and Libraries
Win32, x64
This example gets Emf handle from Rtf file.
L_INT GetEmfHandleFromRtfExample(L_TCHAR* pRtfFileName, L_INT nPageNumber, HENHMETAFILE* hEmfHandle)
{
FILERTFOPTIONS FileRtfOptios;
RASTERIZEDOCOPTIONS RasterizeDocOptions;
memset(&FileRtfOptios, 0, sizeof(FILERTFOPTIONS));
FileRtfOptios.uStructSize = sizeof(FILERTFOPTIONS);
FileRtfOptios.crBackColor = RGB(255,255,255);
memset(&RasterizeDocOptions, 0, sizeof(RASTERIZEDOCOPTIONS));
RasterizeDocOptions.uXResolution = 96;
RasterizeDocOptions.uYResolution = 96;
RasterizeDocOptions.dPageWidth = 8.5;
RasterizeDocOptions.dPageHeight = 11.0;
RasterizeDocOptions.dLeftMargin = 1.0;
RasterizeDocOptions.dTopMargin = 1.0;
RasterizeDocOptions.dRightMargin = 1.0;
RasterizeDocOptions.dBottomMargin = 1.0;
return L_GetEmfHandleFromRtf(pRtfFileName, nPageNumber, &FileRtfOptios, &RasterizeDocOptions, hEmfHandle);
}
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