addLineSignature
- addBibliography
- addBookmark
- addBreak
- addCaption
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addSVG
- addTab
- addTable
- addTableAuthorities
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordFragment
- addWordML
- embedHTML
- addBackgroundImage
- addFooter
- addFooterSection
- addHeader
- addHeaderSection
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createDocx
- createDocxAndDownload
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importChartStyle
- importHeadersAndFooters
- importListStyle
- importStyles
- importStylesWordDefault
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDecimalSymbol
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- clearBlocks
- cloneBlock
- deleteBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- removeTemplateVariableImage
- replaceBlock
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
- tickCheckboxes
addLineSignature


Inserts line signatures into a Word document.
Description
public addLineSignature ( array $options )
This method inserts a line signature into your Word document.
Parameters
options
The possible keys and values are:
Key | Type | Description |
---|---|---|
altText | string | Alternative text. 'Microsoft Office Signature Line...' as default. |
height | int | In points. 96 as default. |
signerInstructions | string | Signer instructions. |
suggestedSigner | string | Suggested signer. |
suggestedSignerEmail | string | Suggested signer email. |
suggestedSignerTitle | string | Suggested signer title. |
width | int | In points. 221 as default. |
Exceptions
Method not available.
Code samples
x
1
require_once 'classes/CreateDocx.php';
2
3
$docx = new CreateDocx();
4
5
$docx->addText('Empty line signature:');
6
$docx->addLineSignature();
7
8
$docx->addText('Line signature with signature information:');
9
$docx->addLineSignature(array('suggestedSigner' => 'John Doe', 'suggestedSignerTitle' => 'Tech editor', 'suggestedSignerEmail' => 'jdoe@mail.com', 'altText' => 'Custom alt text', 'signerInstructions' => 'Custom instructions'));
10
11
$docx->addText('Line signatures added in the same paragraph:');
12
$lineSignatureFragmentA = new WordFragment($docx);
13
$lineSignatureFragmentA->addLineSignature(array('suggestedSigner' => 'John Doe', 'width' => 140, 'height' => 100));
14
15
$tabFragment = new WordFragment($docx);
16
$tabFragment->addTab();
17
$tabFragment->addTab();
18
19
$lineSignatureFragmentB = new WordFragment($docx);
20
$lineSignatureFragmentB->addLineSignature(array('suggestedSigner' => 'Jane Doe', 'width' => 140, 'height' => 100));
21
22
$contents = array();
23
$contents[] = $lineSignatureFragmentA;
24
$contents[] = $tabFragment;
25
$contents[] = $lineSignatureFragmentB;
26
27
$docx->addText($contents);
28
29
$docx->createDocx('output');
30
Release notes
- phpdocx 16.0:
- use EMF as default image.
- generate and add a GUID as id.
- phpdocx 14.5:
- new method.