Hi, this library is realy handy and full-featured. One word : thanks !
Problem :
my code looks like this (like in tutorial ):
$filename = 'helloworld.odt'
$d = new ODT::getInstance();
$pStyle = new ParagraphStyle('myPStyle');
$pStyle->setLineHeight('1cm');
$p = new Paragraph($pStyle);
$p->addText(' oh my god ! it works !! ' );
$d->output($filename);
This works fine, as expected ..
whea I added
$pStyle->setTextAlign(StyleConstants::CENTER);
downloaded document was opened in OpenOffice like simple ascii text but corrupted.
Short look at results shows generated file on web server has 1614 bytes, downloaded 1616. Hexdump show the difference is in first two bytes, 0x0D 0x09 added on begin of downloaded file.
after about hour or researchs i found, class.styleconstant.php has after last
?>
newline + tab
chars
Please repair this for others
thanks
Milan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-01-25
Post awaiting moderation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-02-24
Post awaiting moderation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, this library is realy handy and full-featured. One word : thanks !
Problem :
my code looks like this (like in tutorial ):
$filename = 'helloworld.odt'
$d = new ODT::getInstance();
$pStyle = new ParagraphStyle('myPStyle');
$pStyle->setLineHeight('1cm');
$p = new Paragraph($pStyle);
$p->addText(' oh my god ! it works !! ' );
$d->output($filename);
This works fine, as expected ..
whea I added
$pStyle->setTextAlign(StyleConstants::CENTER);
downloaded document was opened in OpenOffice like simple ascii text but corrupted.
Short look at results shows generated file on web server has 1614 bytes, downloaded 1616. Hexdump show the difference is in first two bytes, 0x0D 0x09 added on begin of downloaded file.
after about hour or researchs i found, class.styleconstant.php has after last
?>
newline + tab
chars
Please repair this for others
thanks
Milan