Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 20 14:52
    AryaDarisova opened #1949
  • Oct 20 14:35
    volhardend commented #1884
  • Oct 20 09:18
    liborm85 commented #1944
  • Oct 20 08:56
    hulang commented #1944
  • Oct 20 07:11
    liborm85 edited #1946
  • Oct 20 05:25
    liborm85 commented #1944
  • Oct 20 05:24
    liborm85 edited #1946
  • Oct 20 05:23
    liborm85 commented #1946
  • Oct 20 05:23
    liborm85 ready_for_review #1946
  • Oct 20 05:23
    liborm85 edited #1946
  • Oct 20 05:23
    liborm85 edited #1946
  • Oct 19 17:52
    stephanvierkant edited #1948
  • Oct 19 17:50
    stephanvierkant edited #1948
  • Oct 19 17:31
    stephanvierkant labeled #1948
  • Oct 19 17:31
    stephanvierkant opened #1948
  • Oct 19 15:00
    liborm85 commented #1916
  • Oct 19 14:57
    stephanvierkant commented #1916
  • Oct 19 13:05
    liborm85 synchronize #1946
  • Oct 19 12:44
    liborm85 synchronize #1946
  • Oct 19 12:23
    liborm85 synchronize #1946
Geoff Maddock
Yes, I did. I see issues that both seem to indicate that numbering already works, but also one issue reporting a bug that hasn't yet been touched and is nearly a year old. I'm just looking to try to find out if there's something i'm doing wrong, or if there is a bug.
Roman Syroeshko
Could you please provide link to that issue? I have very limited spare time, so, yes, some issues may wait longer than others.
Geoff Maddock
Is there anything documented about the feature "Insert binary OLE Objects such as Excel or Visio"? I'd like to do this, but I don't see anything that mentions how.
@geoff-maddock you can see the sample 16
Geoff Maddock
Thanks for the pointer. Looks like it is not set up to work with visio, even though the documentation mentions it.
Hello, everyone there is something wrong on line 144 $this->_DocumentSummaryInformation = $ole->getStream($ole->documentSummaryInformation);
according to PHPWord/src/PhpWord/Shared/OLERead.php online 285 $this->docSummaryInfos = count($this->props) - 1;
Hi everyone. Is there currently a workaround for adding images to the TemplateProcessor?
Hi, just wondering if PHPWord is still being actively developed? Also wondering if PHPWord has support for cross-references.
Angel Guevara
hi, is it possible to use arrays or objects in a word template?

something like having in your word

Name: {$user->fullName} Age: {$user->age}

then on PHP

$templateProcessor->setValue('user', User::findOne($id));
Martin Zajíc
Hi guys, it's possible to make table without any border? I want to make two signs on same line and didn't find better way.
ale rimoldi
Hi, not much going on in here...
But I'll try to ask...
In modern versions of Word Table are by default automatically resized to fit the page width... except if <w:tblLayout w:type="fixed"/> is set in <w:tblPr> ...
I'm still a beginner with PhpWord, but I went through the code and the right thing to do seems to add a writeLayout() after writeWidth() in https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Writer/Word2007/Style/Table.php#L82
That seems to be easy... the only missing bit: how to use on of the properties in https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Style/Table.php to set it (or which setting to add)
Hi everybody
Please, How can i fix Fatal error: Class 'Zend\Validator\InArray' not found ?
cheers mates, is there any way for me to workaround broken pagebreaks for odt export?
Johann Lucas
Hey, im trying to read a .docx, modify some value and transform into a .docx again with wordphp, that's possible?
Wogan May
How the heck do you center text inside a table cell?
$cellHCentered = array('align' => 'center');
$table->addCell(2000, array())->addText('Hello', null, $cellHCentered);
Is there any way to set a tables width by twips instead of percent?

I see in the docs

width. Table width in percent.

but I'd rather do



yea 5000 is my 100%... and 5200 is 104% which doesn't make sense to me
Any recommendations on how best to get issues looked at or help? I know what needs to get changed but not sure how the classes are structured so its hard to figure out what classes to modify.
Looking to solve this issue PHPOffice/PHPWord#957 and this issue PHPOffice/PHPWord#956 currenty
hi, I have a PDF file. Is it posible to convert it into word or docx file by PHPWord??
José Luis Duque Gordillo

@Progi1984 Hey, we are trying to use PHPWord in a new project but we aren't having much success. The sample is currently not working as expected. Do you have any pointers or are you already working in a hot fix? issue in question: PHPOffice/PHPWord#970

We also noticed that the columns are not working and a lot of styles aren't recognized

Robert Burnham
Does PHPOffice (specifically PHPWord and PHPExcel) support PHP 7+ ?
Does PHPWord support inline css and style using addHtml() function. i am fetching the data from database and making html template and then trying to write word docx by using addHtml but some elements are not write properly. is there any solution for this issue? Please reply.
@sahil-github probably not, you'll most likely have to inject it by modifying https://github.com/PHPOffice/PHPWord/blob/c71069022e07d768ec69a5e43e3b6f1fa4a95e84/src/PhpWord/Shared/Html.php

@phpdave Thanks for Reply.
But i noticed that span tag is not working properly inside any other tag like heading tag, paragraph tag and list tag in addHtml() case.
Below is the the code i am fetching from database after replacing template {keywords}. Even Heading tags are also not working for writing doc file. if there is any span tag inside li tag then li content is not printing in word file.

<h1><span style="text-decoration: underline;">LME Copper 3 Month Forward - 2017-01-24 06:30:00 Contract</span></h1>

<p class="MsoNormal" style="font-size: 12.16px;">Furthermore, <span style="font-size: 12.16px;">the mid-January push above a key resistance at 2210, neutralised the bearish intermediate-term trend, shifting the intermediate term outlook to neutral.</span></p>

<li>We see an upside bias for 1873; break here aims maybe up to 1900/1910.</li>
<li>But below 1841 opens risk down to <span style="font-size: 12.16px;">1811</span>.</li>

Please help me to sort out these issues.

Hi sahil like I said before you'll probably have to inject this in a raw format or modify phpword to do what you want it to do. PHPWord is not in a 1.0 release so I wouldn't expect it to work perfectly.
I really only know about the graphing functionality of phpword.
Thanks for reply.
i'll try to find some other ways to sort out this issue.
Good luck!
Stephen Morley
I'm getting an error in the created document: Illegal name character in word/document.xml. When I look there I see an &. I called htmlentities on the string before I pass into phpword and now i'm getting "Undeclare entity" and its pointing to ’. What am I getting wrong here?
Stephen Morley
Is there some proper way to get non-standard characters processed? Most of these originated from people pasting word text into my web app which then placed the data in the database. They are a serious issue as I can't even export/import the database and keep the characters intact. But many of these are messing up the constructed word document. Many went away when I htmlentities() and then converted them to 'normal' characters but there a lots more.
Invalid style value: japaneseCounting Options:bullet,decimal,upperRoman,lowerRoman,upperLetter,lowerLetter
hi is there any way to keeps lines together and page break if not
is there any way to count the number of lines left before inserting another item