DocWire DocToText - Powered by Silvercoders 5.0.5
A multifaceted, data extraction software development toolkit that converts all sorts of files to plain text and html. Written in C++, this data extraction tool has a parser able to convert PST & OST files along with a brand new API for better file processing. To enhance its utility, DocToText, as a data extraction tool, can be integrated with other data mining and data analytics applications. It comes equipped with a high grade, scriptable and trainable OCR that has LSTM neural networks based character recognition. This document parser is able to extract metadata along with annotations and supports a list of formats that include: DOC, XLS, XLSB, PPT, RTF, ODF (ODT, ODS, ODP), OOXML (DOCX, XLSX, PPTX), iWork (PAGES, NUMBERS, KEYNOTE), ODFXML (FODP, FODS, FODT), PDF, EML, HTML, Outlook (PST, OST), Image (JPG, JPEG, JFIF, BMP, PNM, PNG, TIFF, WEBP) and DICOM (DCM)
doctotext::HtmlWriter Class Reference

The HTMLWriter class. More...

#include <html_writer.h>

Inheritance diagram for doctotext::HtmlWriter:
Collaboration diagram for doctotext::HtmlWriter:

Public Member Functions

void write_header (std::ostream &stream) const override
 Writes html header to output stream. It's necessary to call this function before writing any data to get valid html document. More...
 
void write_footer (std::ostream &stream) const override
 Writes html footer to output stream. It's necessary to call this function after writing all data to get a valid html document. More...
 
void write_to (const doctotext::Info &info, std::ostream &stream) const override
 Converts text from callback to html format. More...
 
virtual Writer * clone () const override
 creates a new instance of HtmlWriter
 

Detailed Description

The HTMLWriter class.

This class is used to converts the parsed data from callbacks into HTML format.

example:

ODFOOXMLParser parser("test.docx");
HTMLWriter writer;
parser.onNewNode([&writer](doctotext::Info &info) {
writer.write_to(info, std::cout); // convert callback to html ant writes to std::cout
});

Definition at line 59 of file html_writer.h.

Member Function Documentation

◆ write_footer()

void doctotext::HtmlWriter::write_footer ( std::ostream &  stream) const
override

Writes html footer to output stream. It's necessary to call this function after writing all data to get a valid html document.

Parameters
streamoutput stream

◆ write_header()

void doctotext::HtmlWriter::write_header ( std::ostream &  stream) const
override

Writes html header to output stream. It's necessary to call this function before writing any data to get valid html document.

Parameters
streamoutput stream

◆ write_to()

void doctotext::HtmlWriter::write_to ( const doctotext::Info info,
std::ostream &  stream 
) const
override

Converts text from callback to html format.

Parameters
infodata from callback
streamoutput stream

The documentation for this class was generated from the following file: