| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ | 7 #ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ |
| 8 #define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ | 8 #define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ |
| 9 | 9 |
| 10 #include "../fpdfapi/fpdf_page.h" | 10 #include "../fpdfapi/fpdf_page.h" |
| 11 #include "../fpdfapi/fpdf_pageobj.h" | 11 #include "../fpdfapi/fpdf_pageobj.h" |
| 12 #include "../fpdfapi/fpdf_parser.h" | 12 #include "../fpdfapi/fpdf_parser.h" |
| 13 | 13 |
| 14 class CPDF_PageObjects; | 14 class CPDF_PageObjects; |
| 15 class IPDF_LinkExtract; |
| 16 class IPDF_ReflowedPage; |
| 17 class IPDF_TextPage; |
| 18 class IPDF_TextPageFind; |
| 19 |
| 15 #define PDF2TXT_AUTO_ROTATE 1 | 20 #define PDF2TXT_AUTO_ROTATE 1 |
| 16 #define PDF2TXT_AUTO_WIDTH 2 | 21 #define PDF2TXT_AUTO_WIDTH 2 |
| 17 #define PDF2TXT_KEEP_COLUMN 4 | 22 #define PDF2TXT_KEEP_COLUMN 4 |
| 18 #define PDF2TXT_USE_OCR 8 | 23 #define PDF2TXT_USE_OCR 8 |
| 19 #define PDF2TXT_INCLUDE_INVISIBLE 16 | 24 #define PDF2TXT_INCLUDE_INVISIBLE 16 |
| 20 void PDF_GetPageText(CFX_ByteStringArray& lines, CPDF_Document* pDoc, CPDF_Dicti
onary* pPage, | 25 void PDF_GetPageText(CFX_ByteStringArray& lines, CPDF_Document* pDoc, CPDF_Dicti
onary* pPage, |
| 21 int iMinWidth, FX_DWORD flags); | 26 int iMinWidth, FX_DWORD flags); |
| 22 void PDF_GetPageText_Unicode(CFX_WideStringArray& lines, CPDF_Document* pDoc, CP
DF_Dictionary* pPage, | 27 void PDF_GetPageText_Unicode(CFX_WideStringArray& lines, CPDF_Document* pDoc, CP
DF_Dictionary* pPage, |
| 23 int iMinWidth, FX_DWORD flags); | 28 int iMinWidth, FX_DWORD flags); |
| 24 void PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, CPDF_Document* pDoc, CPD
F_Dictionary* pPage, | 29 void PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, CPDF_Document* pDoc, CPD
F_Dictionary* pPage, |
| 25 FX_DWORD flags); | 30 FX_DWORD flags); |
| 26 CFX_WideString PDF_GetFirstTextLine_Unicode(CPDF_Document* pDoc, CPDF_Dictionary
* pPage); | 31 CFX_WideString PDF_GetFirstTextLine_Unicode(CPDF_Document* pDoc, CPDF_Dictionary
* pPage); |
| 27 class IPDF_TextPage; | |
| 28 class IPDF_LinkExtract; | |
| 29 class IPDF_TextPageFind; | |
| 30 #define CHAR_ERROR -1 | 32 #define CHAR_ERROR -1 |
| 31 #define CHAR_NORMAL 0 | 33 #define CHAR_NORMAL 0 |
| 32 #define CHAR_GENERATED 1 | 34 #define CHAR_GENERATED 1 |
| 33 #define CHAR_UNUNICODE 2 | 35 #define CHAR_UNUNICODE 2 |
| 34 typedef struct { | 36 typedef struct { |
| 35 FX_WCHAR m_Unicode; | 37 FX_WCHAR m_Unicode; |
| 36 FX_WCHAR m_Charcode; | 38 FX_WCHAR m_Charcode; |
| 37 FX_INT32 m_Flag; | 39 FX_INT32 m_Flag; |
| 38 FX_FLOAT m_FontSize; | 40 FX_FLOAT m_FontSize; |
| 39 FX_FLOAT m_OriginX; | 41 FX_FLOAT m_OriginX; |
| 40 FX_FLOAT m_OriginY; | 42 FX_FLOAT m_OriginY; |
| 41 CFX_FloatRect m_CharBox; | 43 CFX_FloatRect m_CharBox; |
| 42 CPDF_TextObject* m_pTextObj; | 44 CPDF_TextObject* m_pTextObj; |
| 43 CFX_AffineMatrix m_Matrix; | 45 CFX_AffineMatrix m_Matrix; |
| 44 } FPDF_CHAR_INFO; | 46 } FPDF_CHAR_INFO; |
| 45 typedef CFX_ArrayTemplate<CFX_FloatRect> CFX_RectArray; | 47 typedef CFX_ArrayTemplate<CFX_FloatRect> CFX_RectArray; |
| 46 #define FPDFTEXT_LRTB 0 | 48 #define FPDFTEXT_LRTB 0 |
| 47 #define FPDFTEXT_RLTB 1 | 49 #define FPDFTEXT_RLTB 1 |
| 48 #define FPDFTEXT_TBRL 2 | 50 #define FPDFTEXT_TBRL 2 |
| 49 #define FPDFTEXT_LEFT -1 | 51 #define FPDFTEXT_LEFT -1 |
| 50 #define FPDFTEXT_RIGHT 1 | 52 #define FPDFTEXT_RIGHT 1 |
| 51 #define FPDFTEXT_UP -2 | 53 #define FPDFTEXT_UP -2 |
| 52 #define FPDFTEXT_DOWN 2 | 54 #define FPDFTEXT_DOWN 2 |
| 53 class IPDF_ReflowedPage; | |
| 54 #define FPDFTEXT_WRITINGMODE_UNKNOW 0 | 55 #define FPDFTEXT_WRITINGMODE_UNKNOW 0 |
| 55 #define FPDFTEXT_WRITINGMODE_LRTB 1 | 56 #define FPDFTEXT_WRITINGMODE_LRTB 1 |
| 56 #define FPDFTEXT_WRITINGMODE_RLTB 2 | 57 #define FPDFTEXT_WRITINGMODE_RLTB 2 |
| 57 #define FPDFTEXT_WRITINGMODE_TBRL 3 | 58 #define FPDFTEXT_WRITINGMODE_TBRL 3 |
| 58 class CPDFText_ParseOptions | 59 class CPDFText_ParseOptions |
| 59 { | 60 { |
| 60 public: | 61 public: |
| 61 | 62 |
| 62 CPDFText_ParseOptions(); | 63 CPDFText_ParseOptions(); |
| 63 FX_BOOL m_bGetCharCodeOnly; | 64 FX_BOOL m_bGetCharCodeOnly; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 virtual int CountLinks() const = 0; | 162 virtual int CountLinks() const = 0; |
| 162 | 163 |
| 163 virtual CFX_WideString GetURL(int index) const = 0; | 164 virtual CFX_WideString GetURL(int index) const = 0; |
| 164 | 165 |
| 165 virtual void GetBoundedSegment(int index, int
& start, int& count) const = 0; | 166 virtual void GetBoundedSegment(int index, int
& start, int& count) const = 0; |
| 166 | 167 |
| 167 virtual void GetRects(int index, CFX_RectArra
y& rects) const = 0; | 168 virtual void GetRects(int index, CFX_RectArra
y& rects) const = 0; |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ | 171 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ |
| OLD | NEW |