JSON API - createCharacterStyle

createCharacterStyle

PREMIUM TRIAL / ADVANCED

Creates a character style.

Note

You are reading the JSON API documentation. For the PHP API method please go to createCharacterStyle.

JSON data
Key Description
name The name of the character style.
bold If true the text will be shown in bold characters.
caps If true displays text in capital letters.
characterBorder

Adds a border to the character

  • type (string): none, single, double, dashed...
  • color (string): ffffff, ff0000...
  • spacing (number): 0, 1, 2...
  • width (number): in eights of a point
color Hexadecimal color value: "FF0000", "000000"...
doubleStrikeThrough If true displays text in doubleStrikeThrough.
em Emphasis mark type: "none", "dot", "circle", "comma", "underDot"
emboss Emboss style.
font
string type: font family: "Arial", "Calibri"...

object type:
  • ascii
  • hAnsi
  • eastAsia
  • cs
fontSize Text size in half-points: 8, 9, 10... Multiply by 2 to get the same size as using the fontSize property with addText and other methods.
hidden Hide style from user interface.
italic If true displays the text in italics.
locked Style cannot be applied.
next Style for next paragraph.
noProof Ignore spelling and grammar errors.
outline Outline style.
position Position value. Positive value for raised and negative value for lowered.
semiHidden Hide style from main user interface.
shadow Shadow style.
strikeThrough If true displays text in strikethrough.
subscript If true displays text in subscript.
superscript If true displays text in superscript.
underline Underlines text. Possible values are: "single", "words", "double", "dotted", "dash" and "wave".
unhideWhenUsed Remove semi-hidden property when style is used.
vanish Uses a vanish style.
vertAlign Vertical alignment. Possible values are: "baseline", "subscript" and "superscript".
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.