All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
Most deprecated things were dropped. See details in https://github.com/PHPOffice/PHPWord/commit/b9f1151bc6f90c276153c3c9dca10a5fc7f355fb.
PhpOffice\PhpWord\Template
PhpOffice\PhpWord\Style\Font::UNDERLINE_DOTHASH
PhpOffice\PhpWord\Style\Font::UNDERLINE_DOTHASHHEAVY
PhpOffice\PhpWord\Style\Cell::VALIGN_TOP
PhpOffice\PhpWord\Style\Cell::VALIGN_CENTER
PhpOffice\PhpWord\Style\Cell::VALIGN_BOTTOM
PhpOffice\PhpWord\Style\Cell::VALIGN_BOTH
PhpOffice\PhpWord\Style\TOC::TABLEADER_DOT
PhpOffice\PhpWord\Style\TOC::TABLEADER_UNDERSCORE
PhpOffice\PhpWord\Style\TOC::TABLEADER_LINE
PhpOffice\PhpWord\Style\TOC::TABLEADER_NONE
PhpOffice\PhpWord\Style\Table::WIDTH_AUTO
PhpOffice\PhpWord\Style\Table::WIDTH_PERCENT
PhpOffice\PhpWord\Style\Table::WIDTH_TWIP
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_NAME
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_SIZE
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_COLOR
PhpOffice\PhpWord\PhpWord::DEFAULT_FONT_CONTENT_TYPE
PhpOffice\PhpWord\Ekement\AbstractContainer::createTextRun()
PhpOffice\PhpWord\Ekement\AbstractContainer::createFootnote()
PhpOffice\PhpWord\Ekement\Footnote::getReferenceId()
PhpOffice\PhpWord\Ekement\Footnote::setReferenceId()
PhpOffice\PhpWord\Ekement\Image::getIsWatermark()
PhpOffice\PhpWord\Ekement\Image::getIsMemImage()
PhpOffice\PhpWord\Ekement\Link::getTarget()
PhpOffice\PhpWord\Ekement\Link::getLinkSrc()
PhpOffice\PhpWord\Ekement\Link::getLinkName()
PhpOffice\PhpWord\Ekement\OLEObject::getObjectId()
PhpOffice\PhpWord\Ekement\OLEObject::setObjectId()
PhpOffice\PhpWord\Ekement\Section::getFootnotePropoperties()
PhpOffice\PhpWord\Ekement\Section::setSettings()
PhpOffice\PhpWord\Ekement\Section::getSettings()
PhpOffice\PhpWord\Ekement\Section::createHeader()
PhpOffice\PhpWord\Ekement\Section::createFooter()
PhpOffice\PhpWord\Ekement\Section::getFooter()
PhpOffice\PhpWord\Media::addSectionMediaElement()
PhpOffice\PhpWord\Media::addSectionLinkElement()
PhpOffice\PhpWord\Media::getSectionMediaElements()
PhpOffice\PhpWord\Media::countSectionMediaElements()
PhpOffice\PhpWord\Media::addHeaderMediaElement()
PhpOffice\PhpWord\Media::countHeaderMediaElements()
PhpOffice\PhpWord\Media::getHeaderMediaElements()
PhpOffice\PhpWord\Media::addFooterMediaElement()
PhpOffice\PhpWord\Media::countFooterMediaElements()
PhpOffice\PhpWord\Media::getFooterMediaElements()
PhpOffice\PhpWord\PhpWord::getProtection()
PhpOffice\PhpWord\PhpWord::loadTemplate()
PhpOffice\PhpWord\PhpWord::createSection()
PhpOffice\PhpWord\PhpWord::getDocumentProperties()
PhpOffice\PhpWord\PhpWord::setDocumentProperties()
PhpOffice\PhpWord\Reader\AbstractReader::getReadDataOnly()
PhpOffice\PhpWord\Settings::getCompatibility()
PhpOffice\PhpWord\Style\AbstractStyle::setArrayStyle()
PhpOffice\PhpWord\Style\Cell::getDefaultBorderColor()
PhpOffice\PhpWord\Style\Font::getBold()
PhpOffice\PhpWord\Style\Font::getItalic()
PhpOffice\PhpWord\Style\Font::getSuperScript()
PhpOffice\PhpWord\Style\Font::getSubScript()
PhpOffice\PhpWord\Style\Font::getStrikethrough()
PhpOffice\PhpWord\Style\Font::getParagraphStyle()
PhpOffice\PhpWord\Style\Frame::getAlign()
PhpOffice\PhpWord\Style\Frame::setAlign()
PhpOffice\PhpWord\Style\NumberingLevel::getAlign()
PhpOffice\PhpWord\Style\NumberingLevel::setAlign()
PhpOffice\PhpWord\Style\Paragraph::getAlign()
PhpOffice\PhpWord\Style\Paragraph::setAlign()
PhpOffice\PhpWord\Style\Paragraph::getWidowControl()
PhpOffice\PhpWord\Style\Paragraph::getKeepNext()
PhpOffice\PhpWord\Style\Paragraph::getKeepLines()
PhpOffice\PhpWord\Style\Paragraph::getPageBreakBefore()
PhpOffice\PhpWord\Style\Row::getTblHeader()
PhpOffice\PhpWord\Style\Row::isTblHeader()
PhpOffice\PhpWord\Style\Row::getCantSplit()
PhpOffice\PhpWord\Style\Row::getExactHeight()
PhpOffice\PhpWord\Style\Spacing::getRule()
PhpOffice\PhpWord\Style\Spacing::setRule()
PhpOffice\PhpWord\Style\Table::getAlign()
PhpOffice\PhpWord\Style\Table::setAlign()
PhpOffice\PhpWord\Writer\AbstractWriter::getUseDiskCaching()
PhpOffice\PhpWord\Writer\HTML::writeDocument()
loadConfig
returns config that was actually appliedborder
attribute for tablesDrop support for PHP 7.0 and older
cloneBlock
function @nicoder #1269align
HTML attribute - @troosan #1231direction
instruction, HTML lang
attribute, formatting inside table cell - @troosan #1273 #1252 #1254autoHyphenation
, consecutiveHyphenLimit
, hyphenationZone
, doNotHyphenateCaps
, Paragraph: suppressAutoHyphens
)<w:br/>
tag. @troosan #1274\PhpOffice\PhpWord\Style\Image
changed from px
to pt
.This release fixes several bugs and adds some new features. This version brings compatibility with PHP 7.0 & 7.1
\PhpOffice\PhpWord\SimpleType\NumberFormat
simple type. - @troosanObject
class names to ObjectElement
) - @SailorMax #1185This release brings several improvements in TemplateProcessor
, automatic output escaping feature for OOXML, ODF, HTML, and RTF (turned off, by default).
It also introduces constants for horizontal alignment options, and resolves some issues with PHP 7.
Manual installation feature has been dropped since the release. Please, use Composer to install PHPWord.
\PhpOffice\PhpWord\SimpleType\Jc
simple type. - @RomanSyroeshko\PhpOffice\PhpWord\SimpleType\JcTable
simple type. - @RomanSyroeshko\PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment
). - @RomanSyroeshko\PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment
). - @RomanSyroeshkoTemplateProcessor::setValue()
. - @RomanSyroeshko #618phpword.ini
or \PhpOffice\PhpWord\Settings
. - @RomanSyroeshko #483TemplateProcessor::applyXslStyleSheet()
. - @RomanSyroeshko #335autoload.php
is not found. - @RomanSyroeshko #371align
option of NumberingLevel
, Frame
, Table
, and Paragraph
styles into alignment
. - @RomanSyroeshkoTemplateProcessor::setValue()
. - @kazitanvirahsan #614, #617getAlign
and setAlign
methods of NumberingLevel
, Frame
, Table
, and Paragraph
styles.
Use the correspondent getAlignment
and setAlignment
methods instead. - @RomanSyroeshkoleft
, right
, and justify
alignment options for paragraphs (now are mapped to Jc::START
, Jc::END
, and Jc::BOTH
). - @RomanSyroeshkoleft
, right
, and justify
alignment options for tables (now are mapped to Jc::START
, Jc::END
, and Jc::CENTER
). - @RomanSyroeshkoTCPDF
due to its limited HTML support. Use DomPDF
or MPDF
writer instead. - @RomanSyroeshko #399\PhpOffice\PhpWord\Style\Alignment
. Style properties, which previously stored instances of this class, now deal with strings.
In each case set of available string values is defined by the correspondent simple type. - @RomanSyroeshko\PhpOffice\PhpWord\Autoloader
, because the latter change made it completely useless.
Autoloaders provided by Composer are in use now (see bootstrap.php
). - @RomanSyroeshko\PhpOffice\PhpWord\Shared\Drawing
replaced by \PhpOffice\Common\Drawing
. - @Progi1984 #658\PhpOffice\PhpWord\Shared\Font
. - @Progi1984 #658\PhpOffice\PhpWord\Shared\String
replaced by \PhpOffice\Common\Text
. - @Progi1984 @RomanSyroeshko #658\PhpOffice\PhpWord\Shared\XMLReader
replaced by \PhpOffice\Common\XMLReader
. - @Progi1984 #658\PhpOffice\PhpWord\Shared\XMLWriter
replaced by \PhpOffice\Common\XMLWriter
. - @Progi1984 @RomanSyroeshko #658AbstractContainer::addMemoryImage()
. Use AbstractContainer::addImage()
instead.Undefined property
error while reading MS-DOC documents. - @jaberu #610$
sign.
That case wasn't taken into account in implementation of TemplateProcessor::fixBrokenMacros()
. - @RomanSyroeshko @d-damien #548Maintenance release. This release is focused primarily on TemplateProcessor
.
TemplateProcessor
to protected
. - @RomanSyroeshko #498TemplateProcessor::setValue()
. - @RomanSyroeshko @nicoSWD #513Sample_07_TemplateCloneRow.docx
and Sample_23_TemplateBlock.docx
result files on Windows platform. - @RomanSyroeshko @AshSat #532PreserveText
element alignment in footer (see Sample_12_HeaderFooter.php
). - @RomanSyroeshko @SSchwaiger #495This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced.
Shape
element - @ivanlanin #123scale
, spacing
, and kerning
property of font style - @ivanlaninPhpWord::save()
method to encapsulate IOFactory
- @ivanlaninShared\Converter
static class - @ivanlaninaddHTML
encoding and ampersand fixes for PHP 5.3 - @bskrtich #270add<elementName>
of container should be case insensitive, e.g. addToc
should be accepted, not only addTOC
- @ivanlanin #294Element\Section::setPageSizeW()
and Element\Section::setPageSizeH()
were mentioned in the docs but not implemented.<th>
tag is closed with </td>
tag: - @franzholz #438Element\Link::getTarget()
replaced by Element\Link::getSource()
Element\Section::getSettings()
and Element\Section::setSettings()
replaced by Element\Section::getStyle()
and Element\Section::setStyle()
Shared\Drawing
and Shared\Font
merged into Shared\Converter
DocumentProperties
replaced by Metadata\DocInfo
Template
replaced by TemplateProcessor
PhpWord->loadTemplate($filename)
README
about requirement for temporary folder to be writable and update samples/index.php
for this requirement check - @ivanlanin #238Template
into TemplateProcessor
- @RomanSyroeshko #216This is an immediate bugfix release for HTML reader.
<p>
and header tags puts no output - @canyildiz @ivanlanin #257This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated.
TextBox
element - @basjan @ivanlanin #228, #229, #231ListItemRun
element that can add a list item with inline formatting like a textrun - @basjan #235Field
element - @basjan #251Line
element - @basjan #253marginLeft
and marginTop
cannot accept float value - @ivanlanin #248w:fldChar
caused OpenOffice to crash when opening DOCX - @ivanlanin #236Footnotes
, Endnotes
, and TOC
Writer\Word2007\Part
: Numbering::writeNumbering()
, Settings::writeSettings()
, WebSettings::writeWebSettings()
, ContentTypes::writeContentTypes()
, Styles::writeStyles()
, Document::writeDocument()
all changed into write()
Writer\Word2007\Part\DocProps
: Split into Writer\Word2007\Part\DocPropsCore
and Writer\Word2007\Part\DocPropsApp
Element\Title::getBookmarkId()
replaced by Element\Title::getRelationId()
Writer\HTML::writeDocument
: Replaced by Writer\HTML::getContent
Style\Image
class - @ivanlaninFootnotes
, Endnotes
, and TOC
with Collections
- @ivanlanin #206phpcpd
and phpmd
on Travis - @ivanlaninget...
method that returns boolean
into is...
or has...
- @ivanlanin.scrutinizer.yml
and include composer.lock
for preparation to Scrutinizer - @ivanlanin #186set...
function of boolean properties; when none is defined, assumed true - @ivanlaninsamples
folder - @ivanlaninThis is a bugfix release for php-zip
requirement in Composer.
This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. Element
subnamespace is introduced in this release to replace Section
. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced.
tblGrid
element for Libre/Open Office table sizing - @gianis6 #183$footnote->addTextBreak()
- @ivanlaninFootnoteReference
style - @ivanlaninbgColor
to font style to define background using HEX color - @jcarignan #168exactHeight
to row style to define whether row height should be exact or atLeast - @jcarignan #168CheckBox
element for sections and table cells - @ozilion #156cloneBlock
and deleteBlock
- @diego-vieira #191Media::resetElements()
to reset all media data - @juzi #19Style::resetStyles()
- @ivanlanin #187docProps/app.xml
Application
to PHPWord
- @ivanlaninword/settings.xml
and word/webSettings.xml
dynamically - @ivanlaninsetMeasurementUnit
- @ivanlanin #199bgColor
from Font
, Table
, and Cell
and put it into the new Shading
style - @ivanlaninIndentation
and Spacing
style - @ivanlanincreateTextRun
replaced by addTextRun
createFootnote
replaced by addFootnote
createHeader
replaced by addHeader
createFooter
replaced by addFooter
createSection
replaced by addSection
Element\Footnote::getReferenceId
replaced by Element\AbstractElement::getRelationId
Element\Footnote::setReferenceId
replaced by Element\AbstractElement::setRelationId
Footnote::addFootnoteLinkElement
replaced by Media::addElement
Footnote::getFootnoteLinkElements
replaced by Media::getElements
Media
Element\Link::getLinkSrc
replaced by Element\Link::getTarget
Element\Link::getLinkName
replaced by Element\Link::getText
Style\Cell::getDefaultBorderColor
Write\AbstractWriter
abstract class - @ivanlanin #160Element
and Exception
- @ivanlanin #187HashTable
and Shared\ZipStreamWrapper
and all related properties/methods - @ivanlanin #187AbstractElement
abstract class - @ivanlanin #187Settings
to Style\Section
- @ivanlanin #187Abstract
prefix and Interface
suffix for all abstract classes and interfaces as per PHP-FIG recommendation - @ivanlanin #187Style\AbstractStyle
abstract class - @ivanlanin #187Footnote
to Footnotes
to reflect the nature of collection - @ivanlaninAbstractContainer
from AbstractElement
- @ivanlaninThis is a bugfix release for PSR-4 compatibility.
This release marked the transformation to namespaces (PHP 5.3+).
addImage()
on sections, headers, footer, cells, and textruns - @ivanlaninaddWatermark()
- @ivanlaninPhpOffice\PhpWord
namespace for PSR compliance - @RomanSyroeshko @gabrielbull #159, #58Classes
to src
and Tests
to test
for PSR compliance - @RomanSyroeshko @gabrielbullThis is a bugfix release for image detection functionality.
This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage.
This is the first release after a long development hiatus in CodePlex. This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. Composer and Travis were added.