PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
text_edit.h File Reference

Text Edit API. More...

#include <pdfsdk/core.h>
#include <pdfsdk/export.h>

Go to the source code of this file.

Classes

struct  PDTFontAttrs
 
struct  PDTParaAttrs
 
struct  PDTListLevelStyle
 
struct  PDTListAttrs
 

Macros

#define PDF_TEXTEDIT_API   PDFSDK_IMPORT_
 

Typedefs

typedef struct PDTLayoutRec_ * PDTLayout
 
typedef struct PDTTextBlockRec_ * PDTTextBlock
 
typedef struct PDTCharIteratorRec_ * PDTCharIterator
 
typedef struct PDTTextCommandRec_ * PDTTextCommand
 

Enumerations

enum  PDTEscapement { kPDTEscapementNone , kPDTEscapementSubscript , kPDTEscapementSuperscript }
 Defines the vertical position of text relative to the baseline. More...
 
enum  PDTAlignment { kPDTAlignmentLeft , kPDTAlignmentRight , kPDTAlignmentCentered , kPDTAlignmentJustify }
 Defines the positioning of text or graphical elements relative to a defined axis or margins. More...
 
enum  PDTListLabelType {
  kPDTListLabelBullet , kPDTListLabelDecimal , kPDTListLabelRomanSmall , kPDTListLabelRomanCapital ,
  kPDTListLabelLetterSmall , kPDTListLabelLetterCapital
}
 Defines the type of marker used to identify and distinguish list items within a list. More...
 
enum  PDTListItemType { kPDTListItemNone , kPDTListItemFirst , kPDTListItemNext , kPDTListItemContinue }
 Defines the classification of individual list items within a structured list. More...
 

Functions

PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDPageBuildTextLayout (PDPage page, PDTLayout *pLayout)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDEFormXObjectBuildTextLayout (PDDoc doc, PDEXObject form, PDTLayout *pLayout)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutSetUserName (PDTLayout layout, const wchar_t *chars, size_t numChars)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutNewTextBlock (PDTLayout layout, size_t index, PDTTextBlock *pBlock)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutInsertTextBlock (PDTLayout layout, size_t index, PDTTextBlock block)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutRemoveTextBlock (PDTLayout layout, size_t index)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutGetNumTextBlocks (PDTLayout layout, size_t *pNumBlocks)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutGetTextBlock (PDTLayout layout, size_t index, PDTTextBlock *pBlock)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTLayoutGetTextBlockIndex (PDTLayout layout, PDTTextBlock block, size_t *pIndex)
 
PDFSDK_IMPORT_ bool PDFSDK_CALLCONV PDTTextBlockEqual (PDTTextBlock a, PDTTextBlock b)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockGetPosition (PDTTextBlock block, PDPointF *pPos)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockGetSize (PDTTextBlock block, PDSizeF *pSize)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockGetRotate (PDTTextBlock block, float *pRotate)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockIsReflected (PDTTextBlock block, bool *pReflected)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockGetBBox (PDTTextBlock block, PDRectF *pBBox)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockGetCharBegin (PDTLayout layout, PDTTextBlock block, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockGetCharEnd (PDTLayout layout, PDTTextBlock block, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockCreateTextElement (PDTTextBlock block, PDEElement *pText)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockIsExplicitWidth (PDTTextBlock block, bool *pValue)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextBlockSetExplicitWidth (PDTTextBlock block, bool value)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorAtBeginPage (PDTLayout layout, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorAtEndPage (PDTLayout layout, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorAtPoint (PDTLayout layout, const PDPointF *, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorForItem (PDTLayout layout, PDETextItem, size_t index, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorForItemAtPoint (PDTLayout layout, PDETextItem, const PDPointF *, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetBlockBegin (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetBlockEnd (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetParaBegin (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetParaEnd (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetLineBegin (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetLineEnd (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetWordBegin (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetWordEnd (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetSpanBegin (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetSpanEnd (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetAbove (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetAboveAtPage (PDTCharIterator, PDTLayout layout, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetBelow (PDTCharIterator, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetBelowAtPage (PDTCharIterator, PDTLayout layout, PDTCharIterator *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorCopy (PDTCharIterator, PDTCharIterator *pCopy)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorIncrement (PDTCharIterator)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorDecrement (PDTCharIterator)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorAdvance (PDTCharIterator, int n)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorDistance (PDTCharIterator, PDTCharIterator, int *pDist)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorLess (PDTCharIterator, PDTCharIterator, bool *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorEqual (PDTCharIterator, PDTCharIterator, bool *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetUnicode (PDTCharIterator, UnicodeChar *buffer, size_t bufsize, size_t *pSize)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetPageIndex (PDTCharIterator, size_t *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetQuad (PDTCharIterator, PDQuad *pQuad)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetOutlineQuad (PDTCharIterator, PDQuad *pQuad)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetTextBlock (PDTCharIterator, PDTTextBlock *pBlock)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetFontAttrs (PDTCharIterator, PDTFontAttrs *pFontAttrs)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetParaAttrs (PDTCharIterator, PDTParaAttrs *pParaAttrs)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetListAttrs (PDTCharIterator, PDTListAttrs *pListAttrs)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetTransform (PDTCharIterator, PDMatrix *)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCharIteratorGetTextItem (PDTCharIterator iter, PDETextItem *pItem)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTFontWasSubstituted (bool *pSubstituted)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateDeleteTextCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateInsertTextCommand (PDDoc doc, PDTCharIterator pos, const PDTFontAttrs *fontAttrs, const wchar_t *chars, size_t numChars, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateReplaceTextCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, const PDTFontAttrs *fontAttrs, const wchar_t *chars, size_t numChars, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDAtom fontFamily, PDAtom fontFormat, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontStyleCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDFontStyle fontStyle, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontSizeCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, float fontSize, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontColorCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDColorValue fontColor, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeEscapementCommand (PDDoc doc, PDTCharIterator begin, PDTCharIterator end, PDTEscapement escapment, PDTTextCommand *cmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeHorzScalingCommand (PDDoc doc, PDTCharIterator begin, PDTCharIterator end, float horzScaling, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeCharSpacingCommand (PDDoc doc, PDTCharIterator begin, PDTCharIterator end, float charSpacing, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontHighlightColorCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDColorValue fontColor, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontStrikeoutColorCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDColorValue fontColor, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeFontUnderlineColorCommand (PDDoc doc, PDTCharIterator beg, PDTCharIterator end, PDColorValue fontColor, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeParaAttrsCommand (PDDoc doc, PDTCharIterator iter, const PDTParaAttrs *paraAttrs, PDTTextCommand *cmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateNewTextBlockCommand (PDDoc doc, PDTLayout layout, const PDPointF *pagePoint, const PDTFontAttrs *fontAttrs, const PDTParaAttrs *paraAttrs, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateDeleteTextBlockCommand (PDDoc doc, PDTLayout layout, PDTTextBlock block, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateMergeTextBlocksCommand (PDDoc doc, PDTCharIterator begin, PDTCharIterator end, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateUpdateTextBlocksCommand (PDDoc doc, PDTLayout layout, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateMoveTextBlockCommand (PDDoc doc, PDTLayout layout, size_t iBlock, const PDPointF *pos, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateRotateTextBlockCommand (PDDoc doc, PDTLayout layout, size_t iBlock, float radians, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateScaleTextBlockCommand (PDDoc doc, PDTLayout layout, size_t iBlock, const PDSizeF *size, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateResizeTextBlockCommand (PDDoc doc, PDTLayout layout, size_t iBlock, const PDSizeF *size, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateSyncWithContentCommand (PDDoc doc, PDTLayout layout, size_t iBlock, bool onTop, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeListStyleCommand (PDDoc doc, PDTCharIterator begin, PDTCharIterator end, const PDTListLevelStyle *style, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateChangeListLevelCommand (PDDoc doc, PDTCharIterator begin, PDTCharIterator end, int change, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTCreateRemoveAnnotFromLayoutCommand (PDDoc doc, PDTLayout layout, PDAnnot annot, PDTTextCommand *pCmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextCommandDo (PDTTextCommand cmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextCommandUndo (PDTTextCommand cmd)
 
PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDTTextCommandIsFontSubstituted (PDTTextCommand cmd, bool *pSubstituted)
 

Detailed Description

Text Edit API.

Enumeration Type Documentation

◆ PDTAlignment

Defines the positioning of text or graphical elements relative to a defined axis or margins.

This enumeration specifies the way content is visually organized.

Enumerator
kPDTAlignmentLeft 

Text is aligned with the left margin, the right edge of the text is jagged.

kPDTAlignmentRight 

Text is aligned with the right margin, and the left edge of the text is jagged.

kPDTAlignmentCentered 

Text is centered between the left and right margins, resulting in jagged edges on both sides.

kPDTAlignmentJustify 

Text is spaced so that both the left and right edges are aligned with the margins, creating a clean block of text.

◆ PDTEscapement

Defines the vertical position of text relative to the baseline.

This enumeration specifies the typesetting in order to properly display mathematical expressions, chemical formulas, and annotated text.

Enumerator
kPDTEscapementNone 

Text is positioned normally on the baseline.

kPDTEscapementSubscript 

Text is positioned slightly below the baseline.

kPDTEscapementSuperscript 

Text is positioned slightly above the baseline.

◆ PDTListItemType

Defines the classification of individual list items within a structured list.

This enumeration specifies the subtype for structuring and formatting lists more effectively. This is important in complex documents where maintaining logical sequence and readability is crucial.

Enumerator
kPDTListItemNone 

This indicates that the list item does not have a specific type or sequence designation.

kPDTListItemFirst 

This type is used for the first item in a list or sequence.

kPDTListItemNext 

This indicates an item that follows another item in a logical sequence.

kPDTListItemContinue 

This type indicates that the list item continues from a previous list or sequence.

◆ PDTListLabelType

Defines the type of marker used to identify and distinguish list items within a list.

This enumeration specifies the visual separation and organization of items in a list.

Enumerator
kPDTListLabelBullet 

Uses simple symbols or characters (e.g., •, ◦, or ●) to mark list items.

kPDTListLabelDecimal 

Uses numbers (1, 2, 3, etc.) to mark list items.

kPDTListLabelRomanSmall 

Uses lowercase Roman numerals (i, ii, iii, etc.) to mark list items.

kPDTListLabelRomanCapital 

Uses uppercase Roman numerals (I, II, III, etc.) to mark list items.

kPDTListLabelLetterSmall 

Uses lowercase alphabet letters (a, b, c, etc.) to mark list items.

kPDTListLabelLetterCapital 

Uses uppercase alphabet letters (A, B, C, etc.) to mark list items.