ArkoPDF
← SDK-API-Referenz

ipdf_paragraph.h

段落:把页面文字识别为可编辑段落,读写文字与字符属性。

Die Schnittstellenbeschreibungen bleiben im englischen Original der Header — so lassen sie sich direkt mit dem Code abgleichen.

Konstanten

SignaturValueDescription
PARA_ALIGN_NONE-1Align None
PARA_ALIGN_LEFT0Align left
PARA_ALIGN_CENTER1Align center
PARA_ALIGN_RIGHT2Align right
PARA_ALIGN_ADJUST3Align adjust
SCRIPT_NORMAL0Normal text
SCRIPT_SUPPER1Supper script
SCRIPT_SUB2Sub script
PDSDK_PARA_UNDOTYPE_DELETEPARA0Delete paragraph. For IPDF_Paragraph::DeleteParagraph().
PDSDK_PARA_UNDOTYPE_INSERTTEXT1Insert text. For IPDF_Paragraph::InsertText().
PDSDK_PARA_UNDOTYPE_DELETETEXT2Delete text. For IPDF_Paragraph::DeleteText().
PDSDK_PARA_UNDOTYPE_FONT3Set font. For IPDF_Paragraph::SetFont().
PDSDK_PARA_UNDOTYPE_FONTSIZE4Set font size. For IPDF_Paragraph::SetFontSize().
PDSDK_PARA_UNDOTYPE_COLOR5Set text color. For IPDF_Paragraph::SetTextColor().
PDSDK_PARA_UNDOTYPE_BOLD6Set bold. For IPDF_Paragraph::SetBold().
PDSDK_PARA_UNDOTYPE_ITALIC7Set italic. For IPDF_Paragraph::SetItalic().
PDSDK_PARA_UNDOTYPE_UNDERLINE8Set under line. For IPDF_Paragraph::SetUnderline().
PDSDK_PARA_UNDOTYPE_STRIKEOUT9Set strikout. For IPDF_Paragraph::SetStrikeout().
PDSDK_PARA_UNDOTYPE_SUPPERSCRIPT10Set supper script. For IPDF_Paragraph::SetScript().
PDSDK_PARA_UNDOTYPE_SUBSCRIPT11Set subscript. For IPDF_Paragraph::SetScript().
PDSDK_PARA_UNDOTYPE_NOSCRIPT12Set no scriopt. For IPDF_Paragraph::SetScript().
PDSDK_PARA_UNDOTYPE_CHARSPACE13Set char space. For IPDF_Paragraph::SetCharSpace().
PDSDK_PARA_UNDOTYPE_WORDSPACE14Set word space. For IPDF_Paragraph::SetWordSpace().
PDSDK_PARA_UNDOTYPE_LINESPACE15Set line space. For IPDF_Paragraph::SetLineSpace().
PDSDK_PARA_UNDOTYPE_ALIGN16Set align. For IPDF_Paragraph::SetAlign().
PDSDK_PARA_UNDOTYPE_INSERTRETURN17Insert return. For IPDF_Paragraph::DeleteText().
PDSDK_PARA_UNDOTYPE_OFFSETPARA18Offset paragraph. For IPDF_Paragraph::OffsetParagraph().
PDSDK_PARA_UNDOTYPE_REPLACETEXT19Repalce text. For IPDF_Paragraph::ReplaceTexts().
PDSDK_PARA_UNDOTYPE_RESIZEWIDTH20Resize paragraph width. For IPDF_Paragraph::ResizeWidth().

class IPDF_Paragraph

Methoden(66)

SignaturBeschreibung
GetBBox(PDSDK_FloatBox* box)Get the bounding box of paragraph.
IsRotate()Test whether the paragraph is rotated.
IsVerticalWrittingMode()Test whether the paragraph is vertical writting mode.
GetText(int start_caret, int end_caret)Get the text of specified range in paragraph.
GetText_UTF8(int start_caret, int end_caret)Get the text of specified range in paragraph.
GetCurrentCaret()Get currernt caret after paragraph modify. When some text changed, such as rest text color,reset font, insert or delete text, the current caret should be changed, so must re-load it.
GetCurCaretRange(int* start_caret, int* end_caret)Get currernt selection range after paragraph modify. When some text changed, such as rest text color,reset font, insert or delete text, the current caret should be changed, so must re-load it.
GetCaretAt(const PDSDK_FloatPoint* point)Get caret by point.
GetCaretPos(int caret, PDSDK_FloatPoint* top, PDSDK_FloatPoint* bottom)Get text caret position.
GetNextCaret(int caret, int direct)Get next text caret.
CountCarets()Count total number of carets in paragraph.
IsHeaderCaret(int caret)Test whether is the first caret of the paragraph.
IsTailCaret(int caret)Test whether is the tail caret of the paragraph.
GetLineHeaderCaret(int caret)Test whether is the first caret of a text line.
GetLineTailCaret(int caret)Test whether is the tail caret of a text line.
CountSelBox(int start_caret, int end_caret)Count the box number of selected text in paragraph.
GetSelBox(int index, PDSDK_FloatBox* box)Get the boxies of selected text in paragraph.
InsertText(int caret, IPDF_Font* font, float font_size, unsigned int co…)Insert text at the position specified by caret.
InsertText(int caret, IPDF_Font* font, float font_size, unsigned int co…)UTF8 version for InsertText.
DeleteText(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem)Delete text in paragraph.
BackSpaceAt(int caret, IPDF_ParaUndoItem* pUndoItem)Do backspace event.
InsertReturn(int caret, IPDF_ParaUndoItem* pUndoItem)Insert return flag to start a new line.
SetStroke(int start_caret, int end_caret, int isStroke, unsigned int s…)Set stroke color to selected texts.
SetTextColor(int start_caret, int end_caret, unsigned int color, IPDF_Par…)Set text color (fill color) to selected texts.
SetFont(int start_caret, int end_caret, IPDF_Font* font, IPDF_ParaUn…)Set font to selected texts.
SetFontSize(int start_caret, int end_caret, float font_size, IPDF_ParaUn…)Set font size to selected texts.
SetItalic(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem)Set italic style to selected texts.
SetBold(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem)Set bold style to selected texts.
SetUnderline(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem)Set underline to selected texts.
SetStrikeout(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem)Set strikout line to selected texts.
SetScript(int start_caret, int end_caret, int nScript, IPDF_ParaUndoIt…)Set script style to selected texts.
IsBold(int caret)Test whether the text is bold.
IsItalic(int caret)Test whether the text is italic.
IsUnderline(int caret)Test whether the text is underline style.
IsStrikeout(int caret)Test whether the text is strikout style.
IsSupperScript(int caret)Test whether the text is supper script style.
IsSubScript(int caret)Test whether the text is subscript style.
GetFont(int caret)Get text font at caret.
GetFontSize(int caret)Get font size at caret.
GetFontColor(int caret)Get text color at caret.
GetCharSpace(int caret)Get char space at caret.
GetWordSpace(int caret)Get word space at caret.
GetLineSpace()Get line space at caret.
GetHorzScale()Get horizontal scale at caret.
SetCharSpace(int start_caret, int end_caret, float space, IPDF_ParaUndoIt…)Set character space to selected texts.
SetWordSpace(int start_caret, int end_caret, float space, IPDF_ParaUndoIt…)Set word space to selected texts.
SetLineSpace(int start_caret, int end_caret, float space, IPDF_ParaUndoIt…)Set line space to selected texts.
SetCharHorzScale(int start_caret, int end_caret, float scale, IPDF_ParaUndoIt…)Not support now.
GetAlign(int caret)Get line alignment at caret.
SetAlign(int start_caret, int end_caret, int align, IPDF_ParaUndoItem…)Set alignment to selected texts.
Offset(float dx, float dy, IPDF_ParaUndoItem* pUndoItem)Move the paragrah.
Transform(IPDF_Matrix* matrix, IPDF_ParaUndoItem* pUndoItem)Transform the paragrah.
ResizeWidth(int leftside_or_rightsize, float dx, IPDF_ParaUndoItem* pUnd…)Resize the width of the paragrah.
GetCharUnicode(int caret)Get unicode at caret.
GetCharsetAt(int caret)Get char set at caret.
MoveLines(int start_caret, int end_caret, float xOffset, float yOffset)Move lines.
ToXML(const wchar_t* temp_font_file)Not support now.
GenerateForm()Generate form.
GetSentenceRange(int caret, int& start_caret, int& end_caret)Get sentence range.
GetInnerParaRange(int caret, int& start_caret, int& end_caret)Get inner paragraph range.
ReplaceTexts(int start_caret, int end_caret, const wchar_t* new_text, IPD…)Replace text in paragraph.
GetZOrder()Not support now.
SetFiexdWidth(float fixed_width)—
CountLines()—
CountSubParagraphs()—
GetSubPragraphPos(int iSub, PDSDK_FloatBox* box_para, int& start_caret, int& e…)—
GetBBox
public: virtual void GetBBox(PDSDK_FloatBox* box) = 0;

Get the bounding box of paragraph.

Parameter

  • box(out) — Receiv the bounding box in user space.
IsRotate
int IsRotate() = 0;

Test whether the paragraph is rotated.

Rückgabewert:1 for rotated, 0 for normal.

IsVerticalWrittingMode
int IsVerticalWrittingMode() = 0;

Test whether the paragraph is vertical writting mode.

Rückgabewert:1 for vertical writting, 0 for normal.

GetText
const wchar_t* GetText(int start_caret, int end_caret) = 0;

Get the text of specified range in paragraph.

Parameter

  • start_caret(in) — The start caret.
  • end_caret(in) — The end caret.

Rückgabewert:The unicodes in sepcified range.

GetText_UTF8
const char* GetText_UTF8(int start_caret, int end_caret) = 0;

Get the text of specified range in paragraph.

Parameter

  • start_caret(in) — The start caret.
  • end_caret(in) — The end caret.

Rückgabewert:The utf8 in sepcified range.

GetCurrentCaret
int GetCurrentCaret() = 0;

Get currernt caret after paragraph modify. When some text changed, such as rest text color,reset font, insert or delete text, the current caret should be changed, so must re-load it.

Rückgabewert:The currrent caret.

GetCurCaretRange
void GetCurCaretRange(int* start_caret, int* end_caret) = 0;

Get currernt selection range after paragraph modify. When some text changed, such as rest text color,reset font, insert or delete text, the current caret should be changed, so must re-load it.

Parameter

  • start_caret(out) — Receiv the start caret of range.
  • end_caret(out) — Receiv the end caret of range.
GetCaretAt
int GetCaretAt(const PDSDK_FloatPoint* point) = 0;

Get caret by point.

Parameter

  • point(in) — The point in user space.

Rückgabewert:The caret amon the point, less then 0 means no caret catched.

GetCaretPos
int GetCaretPos(int caret, PDSDK_FloatPoint* top, PDSDK_FloatPoint* bottom) = 0;

Get text caret position.

Parameter

  • caret(in) — The caret index.
  • top(out) — Top point in user space.
  • bottom(out) — Bottom point in user space.

Rückgabewert:1 for success, 0 for failure.

GetNextCaret
int GetNextCaret(int caret, int direct) = 0;

Get next text caret.

Parameter

  • caret(in) — The caret index.
  • direct(in) — The direction for next caret. @see Caret direction flags

Rückgabewert:The next caret index, less 0 means no caret.

CountCarets
int CountCarets() = 0;

Count total number of carets in paragraph.

Rückgabewert:The total number of carets.

IsHeaderCaret
int IsHeaderCaret(int caret) = 0;

Test whether is the first caret of the paragraph.

Rückgabewert:1 for first caret, 0 for not.

IsTailCaret
int IsTailCaret(int caret) = 0;

Test whether is the tail caret of the paragraph.

Rückgabewert:1 for tail caret, 0 for not.

GetLineHeaderCaret
int GetLineHeaderCaret(int caret) = 0;

Test whether is the first caret of a text line.

Rückgabewert:1 for first caret of line, 0 for not.

GetLineTailCaret
int GetLineTailCaret(int caret) = 0;

Test whether is the tail caret of a text line.

Rückgabewert:1 for tail caret of line, 0 for not.

CountSelBox
int CountSelBox(int start_caret, int end_caret) = 0;

Count the box number of selected text in paragraph.

Parameter

  • caret_start(in) — The start caret of selected text.
  • caret_end(in) — The end caret of selected text.

Rückgabewert:The number of box for selected text.

GetSelBox
int GetSelBox(int index, PDSDK_FloatBox* box) = 0;

Get the boxies of selected text in paragraph.

Parameter

  • index(in) — The zero-based box index, range is 0 to CountSelBox()-1.
  • box(in) — Receive the box data.

Rückgabewert:1 for success, 0 for failure.

InsertText
int InsertText(int caret, IPDF_Font* font, float font_size, unsigned int color, const wchar_t* text, int nBoldItalic, int nUnderlineStrikeout, int nScript, IPDF_ParaUndoItem* pUndoItem) = 0;

Insert text at the position specified by caret.

Parameter

  • caret(in) — The text caret to insert text.
  • font(in) — Font for text.
  • font_size(in) — Font size.
  • color(in) — Text color.Use COLOR_ARGB_MAKE() to mark ARGB color.
  • text(in) — The text.
  • nBoldItalic(in) — A flag indicate the bold/italic.0 for normal, 1 for bold only, 2 for italic only, 3 for BoldItalic.
  • nUnderlineStrikeout(in) — A flag indicate the underline/strikout, 0 for normal, 1 for underline, 2 for strikeout, 3 for both underline and italic.
  • nScript(in) — Script type.@see Text script flags
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

InsertText
int InsertText(int caret, IPDF_Font* font, float font_size, unsigned int color, const char* text_utf8, int nBoldItalic, int nUnderlineStrikeout, int nScript, IPDF_ParaUndoItem* pUndoItem) = 0;

UTF8 version for InsertText.

Parameter

  • caret(in) — The text caret to insert text.
  • font(in) — Font for text.
  • font_size(in) — Font size.
  • color(in) — Text color.Use COLOR_ARGB_MAKE() to mark ARGB color.
  • text(in) — The text.
  • nBoldItalic(in) — A flag indicate the bold/italic.0 for normal, 1 for bold only, 2 for italic only, 3 for BoldItalic.
  • nUnderlineStrikeout(in) — A flag indicate the underline/strikout, 0 for normal, 1 for underline, 2 for strikeout, 3 for both underline and italic.
  • nScript(in) — Script type.@see Text script flags
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

DeleteText
int DeleteText(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Delete text in paragraph.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

BackSpaceAt
int BackSpaceAt(int caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Do backspace event.

Parameter

  • caret(in) — The caret.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

InsertReturn
int InsertReturn(int caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Insert return flag to start a new line.

Parameter

  • caret(in) — The caret indicate where the return flag will be inserted.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetStroke
int SetStroke(int start_caret, int end_caret, int isStroke, unsigned int stroke_color, IPDF_ParaUndoItem* pUndoItem) = 0;

Set stroke color to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • isStroke(in) — A flag to decided whether the selected text to be stroke. 0 for not stroke, 1 for stroke.
  • stroke_color(in) — Stroke color. Use COLOR_ARGB_MAKE() to mark ARGB color.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetTextColor
int SetTextColor(int start_caret, int end_caret, unsigned int color, IPDF_ParaUndoItem* pUndoItem) = 0;

Set text color (fill color) to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • color(in) — Text color.Use COLOR_ARGB_MAKE() to mark ARGB color.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetFont
int SetFont(int start_caret, int end_caret, IPDF_Font* font, IPDF_ParaUndoItem* pUndoItem) = 0;

Set font to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • font(in) — The pdf font.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetFontSize
int SetFontSize(int start_caret, int end_caret, float font_size, IPDF_ParaUndoItem* pUndoItem) = 0;

Set font size to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • font_size(in) — The font size.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetItalic
int SetItalic(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Set italic style to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetBold
int SetBold(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Set bold style to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetUnderline
int SetUnderline(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Set underline to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetStrikeout
int SetStrikeout(int start_caret, int end_caret, IPDF_ParaUndoItem* pUndoItem) = 0;

Set strikout line to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

SetScript
int SetScript(int start_caret, int end_caret, int nScript, IPDF_ParaUndoItem* pUndoItem) = 0;

Set script style to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • nScript(in) — The script type. @see Text script flags.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for sucess, 0 for failure.

IsBold
int IsBold(int caret) = 0;

Test whether the text is bold.

Parameter

  • caret(in) — The caret to test.

Rückgabewert:1 for bold, 0 for normal.

IsItalic
int IsItalic(int caret) = 0;

Test whether the text is italic.

Parameter

  • caret(in) — The caret to test.

Rückgabewert:1 for italic, 0 for normal.

IsUnderline
int IsUnderline(int caret) = 0;

Test whether the text is underline style.

Parameter

  • caret(in) — The caret to test.

Rückgabewert:1 for underline style, 0 for normal.

IsStrikeout
int IsStrikeout(int caret) = 0;

Test whether the text is strikout style.

Parameter

  • caret(in) — The caret to test.

Rückgabewert:1 for strikout style, 0 for normal.

IsSupperScript
int IsSupperScript(int caret) = 0;

Test whether the text is supper script style.

Parameter

  • caret(in) — The caret to test.

Rückgabewert:1 for supper script style, 0 for normal.

IsSubScript
int IsSubScript(int caret) = 0;

Test whether the text is subscript style.

Parameter

  • caret(in) — The caret to test.

Rückgabewert:1 for subscript style, 0 for normal.

GetFont
IPDF_Font* GetFont(int caret) = 0;

Get text font at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The pdf font.

GetFontSize
float GetFontSize(int caret) = 0;

Get font size at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The font size.

GetFontColor
unsigned int GetFontColor(int caret) = 0;

Get text color at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The text color, ARGB format.

GetCharSpace
float GetCharSpace(int caret) = 0;

Get char space at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The character space.

GetWordSpace
float GetWordSpace(int caret) = 0;

Get word space at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The word space.

GetLineSpace
float GetLineSpace() = 0;

Get line space at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The line space.

GetHorzScale
float GetHorzScale() = 0;

Get horizontal scale at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The horizontal scale.

SetCharSpace
void SetCharSpace(int start_caret, int end_caret, float space, IPDF_ParaUndoItem* pUndoItem) = 0;

Set character space to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • space(in) — The new character space.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
SetWordSpace
void SetWordSpace(int start_caret, int end_caret, float space, IPDF_ParaUndoItem* pUndoItem) = 0;

Set word space to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • space(in) — The new word space.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
SetLineSpace
void SetLineSpace(int start_caret, int end_caret, float space, IPDF_ParaUndoItem* pUndoItem) = 0;

Set line space to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • space(in) — The new line space.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
GetAlign
int GetAlign(int caret) = 0;

Get line alignment at caret.

Parameter

  • caret(in) — The caret.

Rückgabewert:The line alignment.

见 Alignment of paragraph.

SetAlign
void SetAlign(int start_caret, int end_caret, int align, IPDF_ParaUndoItem* pUndoItem) = 0;

Set alignment to selected texts.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • align(in) — The new align. @see Alignment of paragraph.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
Offset
void Offset(float dx, float dy, IPDF_ParaUndoItem* pUndoItem) = 0;

Move the paragrah.

Parameter

  • dx(in) — The x-direction delta.
  • dy(in) — The y-derection delta.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
Transform
void Transform(IPDF_Matrix* matrix, IPDF_ParaUndoItem* pUndoItem) = 0;

Transform the paragrah.

Parameter

  • matrix(in) — The transfrom matrix.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
ResizeWidth
void ResizeWidth(int leftside_or_rightsize, float dx, IPDF_ParaUndoItem* pUndoItem) = 0;

Resize the width of the paragrah.

Parameter

  • leftside_or_rightsize(in) — 0 for leftside moved, 1 for rightsize moved.
  • dx(in) — The x-derection delta(oldside_x - newsize_x).
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.
GetCharUnicode
unsigned short GetCharUnicode(int caret) = 0;

Get unicode at caret.

Rückgabewert:Unicode of char.

GetCharsetAt
int GetCharsetAt(int caret) = 0;

Get char set at caret.

Rückgabewert:Charset of char.

见 Font charsets, same as defined in Win32 font charsets

MoveLines
int MoveLines(int start_caret, int end_caret, float xOffset, float yOffset) = 0;

Move lines.

Parameter

  • start_caret(in) — The start caret of selected text.
  • end_caret(in) — The end caret of selected text.
  • xOffset(in) — The x-direction offset.
  • yOffset(in) — The y-direction offset.

Rückgabewert:1 for success, 0 for failure.

GetSentenceRange
void GetSentenceRange(int caret, int& start_caret, int& end_caret) = 0;

Get sentence range.

Parameter

  • caret(in) — The caret in a textline.
  • start_caret(out) — Receiv start caret of sentence.
  • end_caret(out) — Receiv end caret of sentence.
GetInnerParaRange
void GetInnerParaRange(int caret, int& start_caret, int& end_caret) = 0;

Get inner paragraph range.

Parameter

  • caret(in) — The caret in a textline.
  • start_caret(out) — Receiv start caret of inner paragraph.
  • end_caret(out) — Receiv end caret of inner paragraph.
ReplaceTexts
int ReplaceTexts(int start_caret, int end_caret, const wchar_t* new_text, IPDF_Font* pSubstFont, int& caret_anchor, float font_size, unsigned int font_color, int font_bold, int font_italic, IPDF_ParaUndoItem* pUndoItem) = 0;

Replace text in paragraph.

Parameter

  • start_caret(in) — The start caret of inner paragraph.
  • end_caret(in) — The end caret of inner paragraph.
  • new_text(in) — The new text use to replace.
  • pSubstFont(in) — The font used to instea the old font when old font is embbedded.
  • font_size(in) — The font size.-1 for invalide.
  • font_color(in) — The font color.-1 for invalide.
  • font_bold(in) — Bold style.-1 for invalide.1 for bold, 0 for normal.
  • font_italic(in) — Italic style.-1 for invalide. 1 for italic, 0 for normal.
  • new_text(in/out) — A caret anchor, it will be chage after replaced.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

class IPDF_Table

Not support now.

Methoden(7)

SignaturBeschreibung
GetBBox(PDSDK_FloatRect* pBBox)—
GetRowCount()—
GetRowBBox(int iRow, PDSDK_FloatRect* pBBox)—
GetCellCount(int iRow)—
GetCellBBox(int iRow, int iCell, PDSDK_FloatRect* pBBox)—
GetCellText(int iRow, int iCell)—
GetCellTable(int iRow, int iCell)—

class IPDF_LogicalStructAnalyser

The text paragraph recognizer interface.

Methoden(9)

SignaturBeschreibung
Release()Release the Analyser.
DoAnalyse(IPDF_Page* page)Start to recognize the paragraph for a page.
GetParagraphCount()Get paragraph count.
GetParagraph(int index)Get paragraph by index.
GetParagraph(const PDSDK_FloatPoint* point)Get paragraph at point.
NewParagraphAt(const PDSDK_FloatPoint* point, float width, float height)New paragraph at point.
DeleteParagraph(IPDF_Paragraph* para, IPDF_ParaUndoItem* pUndoItem)Delete paragraph from the analyser.
GetTableCount()Not support now.
GetTable(int index)Not support now.
DoAnalyse
int DoAnalyse(IPDF_Page* page) = 0;

Start to recognize the paragraph for a page.

Parameter

  • page(in) — The PDF page to analys.

Rückgabewert:1 for success, 0 for failure.

GetParagraphCount
int GetParagraphCount() = 0;

Get paragraph count.

Rückgabewert:The count of paragraphs.

GetParagraph
IPDF_Paragraph* GetParagraph(int index) = 0;

Get paragraph by index.

Parameter

  • index(in) — The zero-based paragraph index, range is 0 to GetParagraphCount()-1.

Rückgabewert:The pdf paragrah at index.

GetParagraph
IPDF_Paragraph* GetParagraph(const PDSDK_FloatPoint* point) = 0;

Get paragraph at point.

Parameter

  • point(in) — The point in user space.

Rückgabewert:The pdf paragrah at point.

NewParagraphAt
IPDF_Paragraph* NewParagraphAt(const PDSDK_FloatPoint* point, float width, float height) = 0;

New paragraph at point.

Parameter

  • point(in) — The point in user space.
  • width(in) — The width of new paragraph.
  • height(in) — The height of new paragraph.

Rückgabewert:The newly paragrah.

DeleteParagraph
int DeleteParagraph(IPDF_Paragraph* para, IPDF_ParaUndoItem* pUndoItem) = 0;

Delete paragraph from the analyser.

Parameter

  • para(in) — The paragraph to be deleted.
  • pUndoItem(in) — The undo item.Call PDSDK_CreateParaUndoItem() to creat the undo item.

Rückgabewert:1 for success, 0 for failure.

class IPDF_ParaUndoItem

PDF paragraph undo item interface.

Methoden(3)

SignaturBeschreibung
Release()Release undo item.
Undo(IPDF_LogicalStructAnalyser* analyser)Undo.
Redo(IPDF_LogicalStructAnalyser* analyser)Redo.