KVHTMLOptionsEx

This structure defines the options that control the HTML markup written in response to the general style and attributes (font, color, and so on) of the document. The structure is initialized by calling the function fpConvertStream() or KVHTMLConvertFile().

typedef struct tag_KVHTMLOptionsEx
{
    KVCharSet               OutputCharSet;
    BOOL                    bUseDocumentColors;
    BOOL                    bUseDocumentFontInfo;
    BOOL                    bSupportFontFace;
    BOOL                    bSupportUserFontSizeMapping;
    KVFontSizeMap           FontSizeMap;
    BOOL                    bDisplayRelativeFontSize;
    BOOL                    bSupportRFC1942_cols;
    BOOL                    bNbspEmptyCells;
    ENSATableBorder         SATableBorder;
    int                     nTableBorderWidth;
    char                    *pszBaseURL;
    char                    *pszMainURL;
    char                    *pszDefaultOutputDirectory;
    char                    *pszPicPath;
    char                    *pszPicURL;
    char                    *pszJavaURL;
    char                    *pszJavaArchive;
    BOOL                    bRemoveFileNameSpaces;
    BOOL                    bRasterizeFiles
    KVHTMLGraphicType       OutputRasterGraphicType;
    KVHTMLGraphicType       OutputVectorGraphicType;
    int                     cxVectorToRasterXRes;
    int                     cyVectorToRasterYRes;
    BOOL                    bGenerateURLs;
    long                    lcbMaxMemUsage;
    BOOL                    bSupportColumnHeadings;
    BOOL                    bSupportRowHeadings;
    BOOL                    bSupportCellSpan;
    BOOL                    bSupportRowSpan;
    BOOL                    bSupportColumnWidth;
    BOOL                    bRemoveEmptyColumns;
    BOOL                    bRemoveEmptyRows;
    int                     nRowsBeforeSplit;
    KVLanguageID            OutputLanguageID;
    KVHTMLStyleSheetType    eStyleSheetType
    BOOL                    bTabsToTables;
    BOOL                    bForceOutputCharSet;
    BOOL                    bEnableEmptyRows;
    BYTE                    cReplaceChar;
    BYTE                    cRedact;
    KVCharSet               eSrcCharSet;
    BOOL                    bForceSrcCharSet;
    int                     nCompressionQuality;
}
KVHTMLOptionsEx;

Member Descriptions

OutputCharSet

The character set to use for textual output. The available character sets are enumerated in KVCharSet in kvtypes.h. See Convert Character Sets

To make sure that the character set defined here is used, you must set bForceOutputCharSet to TRUE.

The default is KVCS_UNKNOWN.

bUseDocumentColors

Set bUseDocumentColors to TRUE to retain the color attributes information contained in the source document. If you set bUseDocumentColors to FALSE, no color attributes appear in the <font> tags of the output.

The default is FALSE.

bUseDocumentColors

Set bUseDocumentColors to TRUE to retain the font information contained in the source document. If you set bUseDocumentColors to FALSE, no font information appears in the <font> tags in the output.

The default is FALSE.

bSupportFontFace

Set bSupportFontFace to TRUE to retain the font face information contained in the source document. If you set bSupportFontFace to FALSE, no FACE attributes appear in the <font> tags of the HTML output.

This applies only when you set eStyleSheetType to STYLESHEET_DISABLED. The default is TRUE.

bSupportUserFontSizeMapping

Set bSupportUserFontSizeMapping to TRUE to use the font sizes specified in the FontSizeMap. If you set bSupportUserFontSizeMapping to FALSE, HTML Export uses default size attributes.

This applies only when you set eStyleSheetType to STYLESHEET_DISABLED. The default is FALSE.

FontSizeMap

The font sizes to which the HTML tags <font size=1> through <font size=7> correspond. If bSupportUserFontSizeMapping is FALSE, this member can be left blank.

See the Discussion section for more information.

bDisplayRelativeFontSize

Set bDisplayRelativeFontSize to TRUE to use relative font size tags in the HTML output. For example, the tag <font size=+1> adds one to the base font size, which is normally three.

The default is FALSE.

bSupportRFC1942_cols

Set bSupportRFC1942_cols to TRUE to include cols=integer specifications in the <table> tags of the HTML output.

The default is TRUE.

bNbspEmptyCells

Set bNbspEmptyCells to TRUE to include a non-breaking space (<td>&nbsp;</td>) in the markup for empty table cells in the source document. If you set bNbspEmptyCells to FALSE, <td></td> is generated for empty table cells.

This option applies to word processing documents and spreadsheets only.

The default is TRUE.

SATableBorder

Specifies whether table borders are based on the setting in the source document, are always on, or are always off. The options are enumerated in ENSATableBorder in kvtypes.h. See ENSATableBorder.

This option applies to word processing documents only.

The default is SA_BaseOnDocument.

nTableBorderWidth

Sets the width of the table border in pixels.

This option applies to word processing documents only.

The default is 1.

pszBaseURL

The base URL that replaces the $BASE token in the HTML output. See $BASE.

The default is NULL.

pszMainURL

The URL that replaces the $MAINURL token in the HTML output. See $MAINURL.

The default is NULL.

pszDefaultOutputDirectory

The default output directory for auxiliary files created during the conversion.

The default is NULL, and the files are placed in the directory in which your application is running.

pszPicPath

The output directory for graphics created during the conversion. If specified, this member can also be used by the callback functions KVHTMLGetAnchorEx and KVHTMLGetAuxOutputEx.

This option applies to word processing documents only.

The default is NULL, and the files are placed in the directory in which your application is running.

pszPicURL

The URL of the picture files created from embedded graphics in the source document. To specify a complete image source, this element must be combined with pszAnchor of the GetAnchor() callback function. See GetAnchor().

For example, setting pszPicURL to ../cgi-bin/ and setting pszAnchor to pic.jpg results in the following markup:

<IMG SRC="../cgi-bin/pic.jpg">

This element applies to word processing documents only. The default is NULL.

bRemoveFileNameSpaces

Set bRemoveFileNameSpaces to TRUE to remove spaces from generated output file names.

The default is FALSE.

bRasterizeFiles

Set bRasterizeFiles to TRUE to rasterize slides from presentations into single images. For this setting to take effect, you must set the bNoPictures member to FALSE. The format the images are converted to is determined by the OutputRasterGraphicType member.

Set bRasterizeFiles to FALSE to convert the text in slides to HTML. When you set this member to FALSE, images do not appear in the HTML output.

The default is FALSE.

OutputRasterGraphicType

The output format of rasterized embedded graphics. There are six options enumerated in KVHTMLGraphicType in kvhtml.h. See KVHTMLGraphicType.

The default is KVGFX_JPEG.

OutputVectorGraphicType

The output format of vector graphics. The options are enumerated in KVHTMLGraphicType in kvhtml.h. See KVHTMLGraphicType. For more information on displaying vector graphics on UNIX or Linux, see Display Vector Graphics on UNIX and Linux.

The default is KVGFX_JPEG.

cxVectorToRasterXRes

Controls the X resolution (width in pixels) at which presentations and graphics in KeyView supported vector formats are converted. This is set in conjunction with cyVectorToRasterYRes. To set this member, see Set the Resolution of Presentations and Graphics.

The default is 0, which means that the original resolution is retained.

cyVectorToRasterYRes

Controls the Y resolution (height in pixels) at which presentations and graphics in KeyView supported vector formats are converted. This is set in conjunction with cxVectorToRasterXRes. To set this member, see Set the Resolution of Presentations and Graphics.

The default value is 0, which means the original resolution is retained.

NOTE:

This value cannot be negative.

bGenerateURLs

Set bGenerateURLs to TRUE to add anchor tags (<a ...></a></a>) to text starting with "www", "http:" or "file:".

This option applies to word processing documents only. The default is FALSE.

lcbMaxMemUsage

The maximum memory allocated dynamically for token buffers during file processing. If this maximum is reached, Export performs a swap-to-disk operation internally, and then reuses the memory blocks. Export maintains an internal minimum memory size.

This option applies to word processing or text documents only. The default is LONG_MAX. The unit is in bytes.

bSupportColumnHeadings

Set bSupportColumnHeadings to TRUE to include column headings from the source spreadsheet in the output.

This option applies to spreadsheets only. The default is FALSE.

bSupportRowHeadings

Set bSupportRowHeadings to TRUE to include row headings from the source spreadsheet in the output.

This option applies to spreadsheets only. The default is FALSE.

bSupportCellSpan

Set bSupportCellSpan to TRUE to include colspan="n" markup in the output. If text in the source document spans across empty columns, and bSupportCellSpan is enabled, the text is output across columns in the HTML. If this option is disabled, text that spans across columns is output in a single cell.

This option applies to spreadsheets only. The default value is FALSE.

bSupportRowSpan

Set bSupportRowSpan to TRUE to include row span data from the source spreadsheet in the output.

This option applies to spreadsheets only. The default value is FALSE. Currently not supported.

bSupportColumnWidth

Set bSupportColumnWidth to TRUE to include column width data from the source document in the output.

This option applies to spreadsheets only. The default value is FALSE.

bRemoveEmptyColumns

Set bRemoveEmptyColumns to TRUE to remove columns that do not contain text or color. To remove empty columns, you must set bSupportCellSpan to FALSE.

This option applies to spreadsheets only. The default is FALSE.

bRemoveEmptyRows

Set bRemoveEmptyRows to TRUE to remove empty rows that do not contain text or color. This option applies to spreadsheets only.

The default is FALSE.

nRowsBeforeSplit

The approximate number of spreadsheet rows to be processed before splitting a table. This helps to prevent large spreadsheet tables from occurring in a single document, which can cause speed and processing problems for the browser.

This option applies to spreadsheets only. The default is 0.

OutputLanguageID

The language for the textual output of language-specific data such as time and date. OutputLanguageID must be in the system locale. If OutputLanguageID is invalid or not supplied, the system default is used. Language IDs are defined in KVLanguageID in kvtypes.h.

The default is Language_UNKNOWN.

eStyleSheetType

One of the enumerated options for processing style sheet information. The options are defined in KVHTMLStyleSheetType in kvhtml.h. See KVHTMLStyleSheetType.

STYLESHEET_DISABLED—Disables Cascading Style Sheet (CSS) formatting.

CSS_INLINE—Enables CSS formatting, and adds style sheet information inline to the HTML output file.

CSS_TOFILE—Enables CSS formatting, and generates an external file or uses an existing external file, which is referenced in a <link...> element.

The default is STYLESHEET_DISABLED.

bTabsToTables

Set bTabsToTables to TRUE to convert tabbed columns to tables. This option applies to word processing documents only.

When you use bTabsToTables, the original font in the cells is not maintained. The bTabsToTables option is intended for use on plain text files. Its purpose is to make the text more readable when viewed in a browser. Font information is not written into the table cells that are generated. Instead, the default font of the browser is used.

The default is FALSE.

bForceOutputCharSet

Set bForceOutputCharSet to TRUE to use the output character set specified in OutputCharSet, regardless of the internal document information or the source character set specified by eSrcCharSet. Forcing a character set to KVCS_UNKNOWN is always ignored. SeeConvert Character Sets.

The default is FALSE.

bEnableEmptyRows

Set bEnableEmptyRows to TRUE to display empty rows in spreadsheets. If you set bEnableEmptyRows to FALSE, empty rows are not displayed. This option applies only to 20 or more consecutive empty rows.

This option applies to spreadsheets only. The default is FALSE.

cReplaceChar

The character used when a character in the source document’s character set cannot be mapped to the output character set.

The default replacement character is a question mark (?).

cRedact

The character used to replace text that is designated through style mapping to be omitted from the output. This functionality is useful when you need to hide confidential or sensitive information.

The specified character is used for all text that is mapped to a style processed with the KVSTYLE_REDACT flag (defined in kvtypes.h). See Map Styles.

This option applies to word processing documents only. The default replacement character is "X".

eSrcCharSet

Specifies the source character set of the document. The available character sets are enumerated in KVCharSet in kvtypes.h. See Convert Character Sets.

To make sure that the character set defined here is used, you must set bForceSrcCharSet to TRUE.

The default is KVCS_UNKNOWN.

bForceSrcCharSet

Set bForceSrcCharSet to TRUE to use the source character set specified in eSrcCharSet, regardless of the internal document information. See Convert Character Sets.

Forcing a character set to KVCS_UNKNOWN is always ignored.

The default is FALSE.

nCompressionQuality

Controls the output quality of graphics that support compression quality (for example, JPEG). A value of 0 means default quality (85 compression); 1 is the lowest quality (highest compression and therefore the smallest file size); 100 is the highest quality (no compression and therefore the largest file size).

This option applies to word processing documents only. The default is 0.

bNoPictures

This member is only available in the structure in the template files. It is not part of the structure in the API.

If you set bNoPictures to TRUE, embedded graphics in a document are not generated as separate files, image tags are not included in the output, and verbose markup is generated. Because graphics are not generated, the conversion is faster.

If you set bNoPictures to FALSE, embedded graphics in a document are regenerated as separate files, stored in the output directory, and image tags are included in the output.

This member is passed to the bIndex argument of the fpConvertStream() or KVHTMLConvertFile() functions.

The default is FALSE.

Discussion

When the HTML output is viewed, the browser maps <font size=#> to a specific font size.

Set the Resolution of Presentations and Graphics

The cxVectorToRasterXRes and cyVectorToRasterYRes members are set in conjunction to specify the resolution (width in pixels) at which presentations and graphics are converted.

You can specify the resolution in one of two ways:

Set the Resolution Proportionally

To set the resolution proportionally, set cxVectorToRasterXRes to a percentage of the original resolution, and set cyVectorToRasterYRes to 0 (zero).

NOTE:

The percentage value is specified as negative value; however, you cannot set cyVectorToRasterYRes to a negative value.

For example, the following setting converts the graphic at 50 percent of the original resolution:

cxVectorToRasterXRes=-50
cyVectorToRasterYRes=0

The following setting converts the graphic at 200 percent of the original resolution:

cxVectorToRasterXRes=-200
cyVectorToRasterYRes=0

The member that is set to zero is automatically adjusted to maintain the aspect ratio. If you set both cxVectorToRasterXRes and cyVectorToRasterYRes to a percentage, cyVectorToRasterYRes defaults to zero during the conversion.

Set the Resolution in Pixels

To set the resolution in pixels, set one of the members (cxVectorToRasterXRes or cyVectorToRasterYRes) to the number of pixels, and one to zero. For example:

cxVectorToRasterXRes=0
cyVextorToRasterYRes=1500

The member that is set to zero is automatically adjusted to maintain the aspect ratio. The maximum resolution is 4000 pixels.


_HP_HTML5_bannerTitle.htm