PDFTool.NET 7.0
NetParamExtractText.h
1
10#ifndef PDFTK_NET_PTLPARAM_EXTRACTTEXT_H_
11#define PDFTK_NET_PTLPARAM_EXTRACTTEXT_H_
12
13#include <PdfTkNet/NetTk.h>
14
15namespace PdfTkNet {
16
17ref class PtlRect;
18
22
23public ref class PtlParamExtractText : public System::IDisposable
24{
25public:
26 // 抽出するテキスト
27 enum class TEXT_TYPE {
30 };
31
35 enum class UNI_FLAG {
36 UNI_C0_CONTROLS = 0x00000001,
37 UNI_SPACE = 0x00000002,
38 UNI_NO_BREAK_SPACE = 0x00000004,
39 UNI_SOFT_HYPHEN = 0x00000008,
40 UNI_SPACES = 0x00000010,
41 UNI_IDEOGRAPHIC_SPACE = 0x00000020,
44 UNI_ALL = 0x0FFFFFFF
45 };
46
47protected:
48 PdfTk::PtlParamExtractText* m_native;
49public:
50 PdfTk::PtlParamExtractText* getNative() { return m_native; };
51
52public:
58
66
71
76
77public:
84
85public:
95
104 void appendRect(PtlRect^ rectMM);
105
130 void setIgnoreActualText(bool ignoreActualText);
131
139 void setTextOverlapRatio(float overlapRatio);
140
150 void setOverlapAsLine(float overlap);
151
161 void setSameTextOmitRatio(float overlap);
162
173 void setDifferentTextOmitRatio(float overlap, bool applyAtDifferentColor);
174
183
191 void setUnicodeToSpace(wchar_t uni);
192
201
210 void setUnicodeToRemove(wchar_t uni);
211};
212
213} // namespace PdfTkNet
214
215#endif // PDFTK_NET_PTLPARAM_EXTRACTTEXT_H_
void setUnicodeToRemove(UNI_FLAG flag)
指定のUnicodeを削除するか設定。
void setOverlapAsLine(float overlap)
文字と文字がどれだけ重なっていると同じ行とみなすかの設定。
void setUnicodeToRemove(wchar_t uni)
指定のUnicodeを削除するか設定。
PtlParamExtractText()
コンストラクタ
TEXT_TYPE
Definition NetParamExtractText.h:27
@ TEXT_SORT
取得したテキストを座標でソートして抽出
Definition NetParamExtractText.h:29
@ TEXT_RAW
取得したテキストをそのまま抽出
Definition NetParamExtractText.h:28
‾PtlParamExtractText()
デストラクタ
void setSameTextOmitRatio(float overlap)
同じ文字が重なっている場合、文字と文字がどれだけ重なっていると取り除くかの設定。
void setTextOverlapRatio(float overlapRatio)
テキストがテキスト抽出する範囲の矩形とどれくらい重なっていたら抽出対象とするか。
void setIgnoreActualText(bool ignoreActualText)
ActualTextを無視するかを設定。
void setDifferentTextOmitRatio(float overlap, bool applyAtDifferentColor)
違う文字が重なっている場合、文字と文字がどれだけ重なっていると取り除くかの設定。
void setTextType(TEXT_TYPE type)
抽出するテキストのタイプを設定。
void setUnicodeToSpace(UNI_FLAG flag)
指定のUnicodeをSpaceに置き換えるか設定。
void appendRect(PtlRect^ rectMM)
テキスト抽出する範囲の矩形を追加。
void setUnicodeToSpace(wchar_t uni)
指定のUnicodeをSpaceに置き換えるか設定。
UNI_FLAG
削除、若しくはスペース(U+0020)に変換するユニコード。
Definition NetParamExtractText.h:35
@ UNI_REPLACEMENT_CHARACTER
REPLACEMENT CHARACTER -> U+FFFD.
Definition NetParamExtractText.h:43
@ UNI_SPACE
Space -> U+0020.
Definition NetParamExtractText.h:37
@ UNI_VARIATION_SELECTOR
VARIATION_SELECTOR -> U+FE00-U+FE0F.
Definition NetParamExtractText.h:42
@ UNI_C0_CONTROLS
C0 Controls -> U+0000-U+001F.
Definition NetParamExtractText.h:36
@ UNI_IDEOGRAPHIC_SPACE
IDEOGRAPHIC SPACE -> U+3000.
Definition NetParamExtractText.h:41
@ UNI_SOFT_HYPHEN
SOFT HYPHEN -> U+00AD.
Definition NetParamExtractText.h:39
@ UNI_NO_BREAK_SPACE
NO-BREAK SPACE -> U+00A0.
Definition NetParamExtractText.h:38
@ UNI_SPACES
Spaces -> U+2000-U+200B.
Definition NetParamExtractText.h:40
@ UNI_ALL
上記全てを対象とする(今後フラグが増えたらそれも含む)。
Definition NetParamExtractText.h:44
PtlParamExtractText(PtlParamExtractText^ obj)
コピーコンストラクタ alias copy
PtlParamExtractText operator=(PtlParamExtractText^ obj)
コピーオペレータ alias copy
PDFの矩形座標を表現したクラスです。 矩形は左下(left,bottom)、右上(right,top)で表現されます。 座標の単位はmmで原点(0,0)は左下となりますので注意してください。
Definition NetRect.h:24