Export

Export means the output to one of the supported output formats like PDF, HTML, RTF, XLS, etc. The code for starting an export is identical with a print, in the print options dialog the user can choose any export format besides the "normal” output formats Printer, File and Preview. If a format is to be preselected by default, the print start could be as follows:

ListLabel LL = new ListLabel();
LL.DataSource = CreateDataSet();
LL.ExportOptions.Add(LlExportOption.ExportTarget, "PDF");
LL.Print();
LL.Dispose();

The available export targets are listed in the following table:

 

Export target

Value for ExportTarget

Printer

PRN

Preview

PRV

Adobe PDF Format

PDF

XHTML/CSS Format

XHTML

Multi-Mime HTML Format

MHTML

Microsoft Excel Format

XLS

Microsoft Word Format

DOCX

Microsoft XPS Format

XPS

Rich Text Format (RTF)

RTF

Multi-TIFF Picture

PICTURE_MULTITIFF

TIFF Picture

PICTURE_TIFF

PNG Picture

PICTURE_PNG

JPEG Picture

PICTURE_JPEG

Bitmap Picture

PICTURE_BMP

Metafile Picture (EMF)

PICTURE_EMF

File

FILE

Pinwriter (TTY)

TTY

Microsoft PowerPoint Format

PPTX

Text (CSV) Format

TXT

Text (Layout) Format

TXT_LAYOUT

XML Format

XML

 

The following export targets are not supported anymore and are only available for compatibility reasons. If you still want to use the format you have to enable it explicitly via LlSetOptionString(hJob, LL_OPTIONSTR_LEGACY_EXPORTERS_ALLOWED,...) or via LL.Core.LlSetOptionString(...).

Export target

Value for ExportTarget

HTML Format

HTML

HTML jQuery Mobile Format

JQM

 

The other options (e.g. font embedding, encryption, etc.) can also be preset with default values directly from code. This is done, as in the example above, by using the ExportOptions class; the LlExportOption enumeration contains all supported options as values.

Most frequently these are required to execute a "silent" export. It is more convenient to use the Export() method of the component. Please see the "Export Sample".