addDropCap

addDropCap

TRIAL / ADVANCED / PREMIUM

Inserts a drop cap into the Word document.

Description
public addDropCap ([string $letter [, array $options = array(), array $optionsParagraph = array()]])

This method allows to insert a drop cap into the Word document.

Parameters

letter

The letter to be used as drop cap.

options

Options to apply to the drop cap. Default values:

  • 'position' => -2
  • 'fontSize' => 92
For more information about the available options, please check the addText method.

optionsParagraph

Options to apply to the paragraph containing the drop cap. Default values:

  • 'keepNext' => true
  • 'framePr' => dropCap ('drop'), hAnchor ('text'), lines (3), vAnchor ('text'), wrap ('around')
  • 'spacing' => spacingBottom (0), lineSpacing (1498), spacingLineRule ('exact')
  • 'vAlign' => 'baseline'
For more information about the available options, please check the addText method.

Code samples

Example #1

The resulting Word document looks like:

Release notes
  • phpdocx 18.0:
    • new method.