| Top |
Renders character and paragraph formatting, tables, links and attachment placeholders. Outlook HTML encapsulation is detected before rendering. The extracted text is fed through GMimeHtmlToHtml so filtering, fragment output and noscript handling work as for a standalone HTML document. Neither converter is an HTML sanitizer. Compliance checks apply to RTF, not the embedded HTML. Raw HTML headers and footers bypass callbacks.
gboolean (*GMimeRtfToHtmlAttachmentPlaceholderCallback) (int index,GMimeHtmlWriter *writer,gpointer user_data,GError **error);
Writes replacement content for an Outlook \objattph mark. Output from
this callback is not passed to the tag callback. Hidden marks are skipped;
extraction uses the attachment references already present in the HTML.
index |
zero-based attachment placeholder index, in document order |
|
writer |
borrowed HTML writer. |
[transfer none] |
user_data |
callback data. |
[nullable] |
error |
return location for a GError, or |
GMimeTextConverter *
g_mime_rtf_to_html_new (void);
Creates a rich text converter. The default ISO-8859-1 input mapping preserves each wire byte; character decoding follows the RTF code page.
gboolean
g_mime_rtf_to_html_get_extract_encapsulated_html
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_extract_encapsulated_html (GMimeRtfToHtml *converter,gboolean value);
If disabled, renders the RTF representation even in documents declaring
\fromhtml1. Extracted HTML is rewritten, not sanitized.
gboolean
g_mime_rtf_to_html_get_output_html_fragment
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_output_html_fragment (GMimeRtfToHtml *converter,gboolean value);
Fragment extraction also omits the doctype and head contents.
GMimeHeaderFooterFormat
g_mime_rtf_to_html_get_header_format (GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_header_format (GMimeRtfToHtml *converter,GMimeHeaderFooterFormat value);
Determines how to write the configured header. HTML bypasses filtering.
GMimeHeaderFooterFormat
g_mime_rtf_to_html_get_footer_format (GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_footer_format (GMimeRtfToHtml *converter,GMimeHeaderFooterFormat value);
Determines how to write the configured footer. HTML bypasses filtering.
GMimeHtmlNoScriptHandling
g_mime_rtf_to_html_get_no_script_handling
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_no_script_handling (GMimeRtfToHtml *converter,GMimeHtmlNoScriptHandling value);
Unwrap mode parses noscript contents as markup and omits the tags.
In the other modes the renderer's scripting setting must match value
.
void g_mime_rtf_to_html_set_html_tag_callback (GMimeRtfToHtml *converter,GMimeHtmlTagCallback callback,gpointer user_data,GDestroyNotify destroy);
The callback must explicitly write each desired tag. It is not invoked
for generated document wrappers, configured headers/footers or attachment
callback output. Pass NULL to restore normal tag output. The registration
is destroyed when replaced or finalized, and cannot change during conversion.
GMimeHtmlTagCallback g_mime_rtf_to_html_get_html_tag_callback (GMimeRtfToHtml *converter,gpointer *user_data);
[skip]
converter |
||
user_data |
receives the borrowed callback data. |
[out][optional][nullable][transfer none] |
void g_mime_rtf_to_html_set_attachment_placeholder_callback (GMimeRtfToHtml *converter,GMimeRtfToHtmlAttachmentPlaceholderCallback callback,gpointer user_data,GDestroyNotify destroy);
Registers a writer for rendered attachment placeholders. If NULL, no
replacement is written. Like tag callbacks, this registration cannot
change during conversion and is destroyed when replaced or finalized.
GMimeRtfToHtmlAttachmentPlaceholderCallback g_mime_rtf_to_html_get_attachment_placeholder_callback (GMimeRtfToHtml *converter,gpointer *user_data);
[skip]
converter |
||
user_data |
receives the borrowed callback data. |
[out][optional][nullable][transfer none] |
guint
g_mime_rtf_to_html_get_max_group_depth
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_max_group_depth (GMimeRtfToHtml *converter,guint value);
Content in groups exceeding this limit is discarded.
guint
g_mime_rtf_to_html_get_max_font_table_entries
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_max_font_table_entries (GMimeRtfToHtml *converter,guint value);
References to excess entries use the document's default code page.
guint
g_mime_rtf_to_html_get_max_color_table_entries
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_max_color_table_entries (GMimeRtfToHtml *converter,guint value);
References to excess entries are rendered using the default color.
guint
g_mime_rtf_to_html_get_max_element_depth
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_max_element_depth (GMimeRtfToHtml *converter,guint value);
Sets the GMimeHtmlToHtml depth limit for encapsulated HTML. Once it is exceeded the remaining markup is treated as literal text.
void g_mime_rtf_to_html_set_compliance_logger (GMimeRtfToHtml *converter,GMimeRtfComplianceLogger logger,gpointer user_data,GDestroyNotify destroy);
Reports RTF diagnostics during conversion. Encapsulated HTML markup
is not checked. Pass NULL to disable reporting. The registration cannot
change during conversion and is destroyed when replaced or finalized.
GMimeRtfComplianceLogger g_mime_rtf_to_html_get_compliance_logger (GMimeRtfToHtml *converter,gpointer *user_data);
[skip]
converter |
||
user_data |
receives the borrowed logger data. |
[out][optional][nullable][transfer none] |
GMimeRtfComplianceOptions *
g_mime_rtf_to_html_get_compliance_options
(GMimeRtfToHtml *converter);
void g_mime_rtf_to_html_set_compliance_options (GMimeRtfToHtml *converter,GMimeRtfComplianceOptions *options);
Retains a reference to options
. Diagnostic limits restart for each
conversion and do not affect rendering.