-
Notifications
You must be signed in to change notification settings - Fork 2.7k
added "bgColor" fontStyle, "exactHeight" tableRowStyle and minor modifs for php://output #168
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
Signed-off-by: Julien Carignan <[email protected]>
- mostly for removing the added space after a table - Code mostly come from this discussion: https://phpword.codeplex.com/discussions/440933 - Usage: $table->addRow(5000, $rowStyle, "exact"); Signed-off-by: Julien Carignan <[email protected]>
- added content-length header to know the total file size during the download - Tmp file should go into sys_get_temp_dir() instead of "./" Signed-off-by: Julien Carignan <[email protected]>
Signed-off-by: Julien Carignan <[email protected]>
@jcarignan Could you add some unit tests and documentation ? |
@jcarignan I suggest to use row style (the |
new usage: $table->addRow($height, array("heightRule"=>"exact")); Signed-off-by: Julien Carignan <[email protected]>
Signed-off-by: Julien Carignan <[email protected]>
@ivanlanin heightRule is now in row style! @Progi1984 Still trying to figure out how to add unit tests, but documentations is coming soon..! |
Thanks. I'll review and merge your code ASAP. |
@ivanlanin Seems like the other values of heightRule are useless to users ("auto" and "atLeast"): So I think it'll be better to change the variable to a boolean |
So the condition is like this, right?
If so, I agree with you. It's easier to use boolean. |
other way around! |
Ups, my bad :) Are you going to re-push you commit? Can you sync yours with the current version of develop branch? You can find out how to do that in this manual. Tell me if you have any difficulties either in merging fork or creating unit tests. |
just pushed another commit, new usage: I'll try to sync now (I'm using tortoise) |
Ok. Take your time. I'm off for a while. |
- Comment header('Content-Length:'): HTTP header should not be in class that can be called via CLI - Incorporate temporary location to ODT and RTF - Update documentation - Add unit tests
Merged with some modifications. I removed HTTP header from Word2007 writer class since PHPWord should also can be called from CLI. Thank you @jcarignan. |
added "bgColor" fontStyle, "exactHeight" tableRowStyle and minor modifs for php://output
BGCOLOR:
$section->addText(" myText ", array("bgColor" => "112233"));
my temporary fix is replacing all space with the htmlCode of a space so if you really need this feature, add this around line 78 in Word2007/Base.php, just before $objWriter->writeRaw($strText);
$strText = str_replace(" ", " ", $strText);
TABLE ROW STYLE EXACTHEIGHT
$table->addRow($height, array("exactHeight" => true));
MODIFS PHP://OUTPUT