TXT2DOCX
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createDocx
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importHeadersAndFooters
- importStyles
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addTable
- addTableContents
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteTemplateBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- tickCheckbox
TXT2DOCX
BASIC / ADVANCED / PREMIUM
Transforms plain text into WordML with custom styles.
Description
public TXT2DOCX (string $source [, array $options])
This method allows to insert contents from a TXT file into a Word document applying Word styles to it.
You may check the available styles for paragraphs, tables and lists with the help of the parseStyles method.
Parameters
source
The path to the TXT file which contents you want to insert into a Word document.
options
The possible keys and values are:
Key | Type | Description |
---|---|---|
styleTbl | array | The table style that you want to use. |
styleLst | array | The list style that you want to use. |
styleP | array | The paragraph style that you want to use. |
Return values
Void.