LlStgsysConvert

Syntax:

INT LlStgsysConvert (HLLSTG hStg, LPCTSTR pszDstFilename, LPCTSTR pszFormat);

Task:

Converts a preview file to another format.

Parameter:

hStg: The handle returned by LlStgsysStorageOpen()

pszDstFilename: Name of the target file. It is also possible to use the placeholder %d (e.g. "page %d"). This is important e.g. for converting JPEGs, because without the placeholder only one page will result.

pszFormat: Target format. Valid values are:

Value

Meaning

PRN

Printer

PRV or LL

Preview

PDF

Adobe PDF Format

XHTML *

XHTML/CSS Format

MHTML *

Multi-Mime HTML Format

XLS *

Microsoft Excel Format

DOCX *

Microsoft Word Format

XPS

Microsoft XPS Format

TIFF or PICTURE_MULTITIFF

TIFF Picture

PNG or PICTURE_PNG

PNG Picture

JPEG bzw. PICTURE_JPEG

JPEG Picture

EMF

Metafile Picture (EMF)

TTY

Pinwriter (TTY)

TXT

Text (CSV) Format

* only if embedded in the preview file, see LL_OPTIONSTR_EMBEDDED_EXPORTS

This parameter allows you to declare a semicolon-separated list with further export options. You will find the accepted values in the chapter "The Export Modules". Please note that not all options can be supported with this API. An example is the parameters "PDF;PDF.EncryptionFile=1".

Additional to the mentioned parameters above the following parameters can be used:

Value

Meaning

PageIndexRange

Analog to the print options dialog a range for pages can be set.

JobIndexRange

Analog to the print options dialog a range for the job can be set.

IssueIndexRange

Analog to the print options dialog a range for the issues can be set.

 

An example of this is the use of " PDF;Export.PageIndexRange=2-3".

With this, only pages 2 and 3 are converted to PDF.

The export to PRN creates a file that is specially prepared for the given printer (parameter "PRN.Device="). This file can be output on the printer by copying it directly. Therefore, the printer name (device name) must be explicitly defined.

Return value:

<0: Errorcode
 = 0: okay

Hints:

-

Example:

HLLSTG hStgOrg;
 
hStgOrg = LlStgsysStorageOpen("c:\\test\\label1.ll", "",
            FALSE, TRUE);
LlStgsysStorageConvert(hStgOrg, "c:\\test\\label2.pdf", "PDF");
LlStgsysStorageClose(hStgOrg);

See also:

LlStgsysStorageOpen, LlStgsysStorageConvert