Hi ,
I want to read and modify the existing text of an RTF document. I have seen sample 28 in the official documentation of the PHPword but. it only reads the text and writes it. The problem I am having is that i cannot find the text within the document.
From what i have understood . there is SECTION-->ELEMENT. but inside element where is text ?.
I have read the source classes but cannot find anything that contains text. Therefore If someone has experience with phpword , kindly guide me here.
Any help is appriciated in advance.
modify existing text in RTF doc using phpword
I have no experience with PHPWord library at all, but the top google search result for PHPWord leads to github. The README links to both API Documentation and developer documentation.
I also see that this website (which claims to be its home) documentation page and forum.
The code examples I see are all trivial examples on how to create a word doc. I don't see anything about reading or editing any existing file -- and much of the comments seem to be asking this same question. Perhaps you should contact them on twitter and ask them to direct you to such an example (or provide one if none exists).
Looks like it's entirely designed to create documents, not edit existing ones. I don't, for example, see any mention of importing a document.
The one on github seems like it might be a different project (though some of the people are the same), and includes a [font=monospace]\PhpOffice\PhpWord\Element\Text->getText()[/font] method.
sneakyimp;11051399 wrote:I have no experience with PHPWord library at all, but the top google search result for PHPWord leads to github. The README links to both API Documentation and developer documentation.
I also see that this website (which claims to be its home) documentation page and forum.
The code examples I see are all trivial examples on how to create a word doc. I don't see anything about reading or editing any existing file -- and much of the comments seem to be asking this same question. Perhaps you should contact them on twitter and ask them to direct you to such an example (or provide one if none exists).
Twitter : tweeted and mentioned them. No response (4 days now) .
I have even posted on their github bug-reporting service . but after initial reply they have gone missing. I have filed a bug since 3 days already but no reply after initial one.
mudassar192;11051431 wrote:Twitter : tweeted and mentioned them. No response (4 days now) .
I have even posted on their github bug-reporting service . but after initial reply they have gone missing. I have filed a bug since 3 days already but no reply after initial one.
Weedpacket pointed out that the library seems to be solely for the purpose of creating documents, not editing them.