importStylesWordDefault
- addBibliography
- addBookmark
- addBreak
- 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
- 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
importStylesWordDefault
TRIAL / ADVANCED / PREMIUM
Imports MS Word default styles.
Description
public importStylesWordDefault ( [string $type = 'ignore', array $styles = array()] )
This method imports MS Word default style names to the document.
Parameters
type
The available options are:
- 'ignore': ignore styles with the same name.
- 'replace': overwrite styles with the same name.
styles
Styles to be imported. All as default.
The available styles are:
- 'DefaultParagraphFont' : character style.
- 'CommentReference', 'CommentText', 'CommentTextChar' : comment styles.
- 'EndnoteReference', 'EndnoteText', 'EndnoteTextChar' : endnote styles.
- 'FootnoteReference', 'FootnoteText', 'FootnoteTextChar' : footnote styles.
- 'Heading1', 'Heading2', 'Heading3', 'Heading4', 'Heading5', 'Heading6', 'Heading1Char', 'Heading2Char', 'Heading3Char', 'Heading4Char', 'Heading5Char', 'Heading6Char' : heading styles.
- 'Hyperlink' : hyperlink style.
- 'NoList' : numbering style.
- 'NoSpacing' : paragraph style.
- 'TableGrid', 'TableNormal' : table style.
- 'Title', 'TitleChar', 'Subtitle', 'SubtitleChar' : title styles.
Code samples
Release notes
- phpdocx 15.0:
- new method.