#include "l_bitmap.h"
L_LTDOCWRT_API L_INT EXT_FUNCTION L_DocWriterConvert(pszLtdFileName, pszFileName, Format, pDocOptions, pfnStatusCallback, pUserData)
Converts a file from the LEAD format to any of the supported document formats.
Character string containing the name and path to the LEAD file (source file).
Character string containing the name and path to the document file to save (output file).
File format of the output file. Possible values are:
Value | Meaning |
---|---|
DOCUMENTFORMAT_PDF | [1] Portable Document format (PDF) |
DOCUMENTFORMAT_DOC | [2] MS-Word document format (DOC) |
DOCUMENTFORMAT_RTF | [3] Rich Text document format (RTF) |
DOCUMENTFORMAT_HTM | [4] HyperText Markup Language document format (HTML) |
DOCUMENTFORMAT_TXT | [5] Text file format (TXT) |
DOCUMENTFORMAT_EMF | [6] Enhanced Meta file format (EMF) |
DOCUMENTFORMAT_XPS | [7] Microsoft XML Paper Specification format (XPS) |
Note: Requires .NET framework 3.0 | |
DOCUMENTFORMAT_DOCX | [8] Microsoft Word Document Format (DocX) |
DOCUMENTFORMAT_XLS | MS-Excel document format (Xls) |
Note: Requires .NET framework 3.5 and Microsoft Open XML Format SDK 2.0 |
Pointer to the document object structure. It can be pointer to one of the following document options structures:
Structure | Description |
---|---|
DOCWRTEMFOPTIONS | EMF format options |
DOCWRTTXTOPTIONS | Text format options |
DOCWRTPDFOPTIONS | PDF format options |
DOCWRTDOCOPTIONS | DOC format options |
DOCWRTRTFOPTIONS | RTF format options |
DOCWRTHTMOPTIONS | HTML format options |
DOCWRTXPSOPTIONS | XPS format options |
DOCWRTDOCXOPTIONS | DocX format options |
DOCWRTXLSOPTIONS | Xls format options |
Pointer to an optional callback function used to follow the job's progress.
If you do not provide a callback function, use NULL as the value of this parameter.
If you do provide a callback function, use the function pointer as the value of this parameter.
Pointer that you can use to pass one or more additional parameters that the callback function needs.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function can only convert a LEAD file to the formats listed in Format
. You cannot convert from a LEAD format to a LEAD format. Such conversions fail and return an error.
Required DLLs and Libraries
Win32, x64.
This example converts Lead document format (ltd) to MS Word document format (doc).
L_INT L_DocWriterConvertExample(L_VOID)
{
L_INT nRet=0;
DOCWRTDOCOPTIONS doc;
doc.TextMode = DOCWRTTEXTMODE_FRAMED;
doc.uFlags = 0;
doc.Options.uStructSize = sizeof(doc);
nRet = L_DocWriterConvert(MAKE_IMAGE_PATH(TEXT("LTD_Document.ltd")),
MAKE_IMAGE_PATH(TEXT("DOC_Document.doc")),
DOCUMENTFORMAT_DOC,
&doc,
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