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)
formatting_style.h
1/***************************************************************************************************************************************************/
2/* DocToText - A multifaceted, data extraction software development toolkit that converts all sorts of files to plain text and html. */
3/* 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. */
4/* To enhance its utility, DocToText, as a data extraction tool, can be integrated with other data mining and data analytics applications. */
5/* It comes equipped with a high grade, scriptable and trainable OCR that has LSTM neural networks based character recognition. */
6/* */
7/* This document parser is able to extract metadata along with annotations and supports a list of formats that include: */
8/* DOC, XLS, XLSB, PPT, RTF, ODF (ODT, ODS, ODP), OOXML (DOCX, XLSX, PPTX), iWork (PAGES, NUMBERS, KEYNOTE), ODFXML (FODP, FODS, FODT), */
9/* PDF, EML, HTML, Outlook (PST, OST), Image (JPG, JPEG, JFIF, BMP, PNM, PNG, TIFF, WEBP) and DICOM (DCM) */
10/* */
11/* Copyright (c) SILVERCODERS Ltd */
12/* http://silvercoders.com */
13/* */
14/* Project homepage: */
15/* http://silvercoders.com/en/products/doctotext */
16/* https://www.docwire.io/ */
17/* */
18/* The GNU General Public License version 2 as published by the Free Software Foundation and found in the file COPYING.GPL permits */
19/* the distribution and/or modification of this application. */
20/* */
21/* Please keep in mind that any attempt to circumvent the terms of the GNU General Public License by employing wrappers, pipelines, */
22/* client/server protocols, etc. is illegal. You must purchase a commercial license if your program, which is distributed under a license */
23/* other than the GNU General Public License version 2, directly or indirectly calls any portion of this code. */
24/* Simply stop using the product if you disagree with this viewpoint. */
25/* */
26/* According to the terms of the license provided by SILVERCODERS and included in the file COPYING.COM, licensees in possession of */
27/* a current commercial license for this product may use this file. */
28/* */
29/* This program is provided WITHOUT ANY WARRANTY, not even the implicit warranty of merchantability or fitness for a particular purpose. */
30/* It is supplied in the hope that it will be useful. */
31/***************************************************************************************************************************************************/
32
33#ifndef DOCTOTEXT_FORMATTING_STYLE_H
34#define DOCTOTEXT_FORMATTING_STYLE_H
35
36#include <string>
37#include "defines.h"
38
39namespace doctotext
40{
41 enum TableStyle { TABLE_STYLE_TABLE_LOOK, TABLE_STYLE_ONE_ROW, TABLE_STYLE_ONE_COL, };
42 enum UrlStyle { URL_STYLE_TEXT_ONLY, URL_STYLE_EXTENDED, URL_STYLE_UNDERSCORED, };
43
44 class DllExport ListStyle
45 {
46 private:
47 struct Implementation;
48 Implementation* m_impl;
49
50 public:
51 ListStyle();
52 ~ListStyle();
53 ListStyle(const ListStyle& style);
54 ListStyle& operator = (const ListStyle& style);
56 void setPrefix(const std::string& prefix);
57 void setPrefix(const char* prefix);
58 const char* getPrefix() const;
59 };
60
62 {
64 : table_style(TABLE_STYLE_TABLE_LOOK), url_style(URL_STYLE_EXTENDED)
65 {}
66 FormattingStyle(const TableStyle &tableStyle, const UrlStyle &urlStyle)
67 : table_style(tableStyle), url_style(urlStyle)
68 {}
69 TableStyle table_style;
70 UrlStyle url_style;
71 ListStyle list_style;
72 };
73
74 enum class Language
75 {
76 english,
77 spanish,
78 russian,
79 polish,
80 };
81 DllExport std::string languageToName(const Language lang);
82 DllExport Language nameToLanguage(const std::string& name);
83
84 enum XmlParseMode { PARSE_XML, FIX_XML, STRIP_XML };
85} // namespace doctotext
86
87#endif
void setPrefix(const std::string &prefix)
Sets leading characters for each position in the list. prefix must be a value encoded in UTF8....