-
-
Notifications
You must be signed in to change notification settings - Fork 85
Support PhpWordOutput format #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e format for PhpWordOutput.
Comparing the unzip files is necessary. Two word documents are only the same if they are generated exactly at the same timestamp. (This might be caused by the zip algorithm or some other word file config that can not be manipulated by the PhpWord library.) Therefore, the unzipped content gets compared.
Replace the element type with the generic text element. Use a static style provider to get the current text style (value, amount, currency, further information).
This reverts commit af49888.
…ion by rounding from float to integer.
…eeded. The placeholder is already hardcoded by a switch for the different payment parts.
Hey @sevjan – thank you for the pull request. Interesting application that I would not have thought of :) I will gladly have a look at this pr as soon as I find the time to do so. |
I had a first look. This seems a nice implementation. There are two things we need to have a closer look:
If you allow me to edit this branch, I can help working on it without needing to open a new pr. |
Thank you for your prompt reply.
|
Closing due to inactivity and obviously missing demand. |
In our enviroment we often use the PhpOffice/PhpWord library. With a Office Word ouput the user has more flexiblity to change the document afterwards. With the existing Html/Pdf outputs we could not achive that. (An option would have been with ImageMagick to render a TCPDF, convert it to PNG, cut out the payment part and add it to the word document. But the drawback would haven been to require all the ImageMagick stuff and to install the extesion.)
Therefore I added a PhpWordOutput version. I have tried to follow best practices as much as possible and to meet the code style. If I missunderstood something please let me know to correct it.
For exacte position I hade to use some ugly nested tables. But if nothing is to be changed in the QR invoice part anyway, it shouldn't matter.
Of course, this output is a slightly different one because it can be edited afterwards due to the Office Word format. So I could understand if you don't want to have this kind of export in the core library.
If you need any further information or test for this PR just let me know.
And don't forget for my first PR