#include "l_bitmap.h"
L_LTFIL_API L_INT EXT_FUNCTION L_GetEmfHandleFromRtf (pRtfFileName, nPageNumber, pRtfOptions, pRasterizeDocOptions, hEmfHandle)
L_TCHAR * pRtfFileName; |
file name |
L_INT nPageNumber; |
page number |
pFILERTFOPTIONS pRtfOptions; |
pointer to a structure |
pRASTERIZEDOCOPTIONS pRasterizeDocOptions; |
pointer to a structure |
HENHMETAFILE * hEmfHandle; |
pointer to an EMF handle |
Gets an EMF handle from a specific page in RTF file.
Parameter |
Description |
pRtfFileName |
Character string that contains the name of the source RTF file. |
nPageNumber |
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. |
pRtfOptions |
Pointer to a structure that contains the options to be used when loading RTF file. The following options will be used: RTFFILEOPTIONS.crBackColor. |
pRasterizeDocOptions |
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 |
hEmfHandle |
Address of an Enhanced Metafile (EMF) handle that will be updated with the obtained EMF. |
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
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. |
Win32, x64
Functions: |
|
Topics: |
|
|
//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);
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET