Skip to content
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

CheckBox can't be read #613

Closed
kevinbaluha opened this issue Sep 5, 2015 · 0 comments
Closed

CheckBox can't be read #613

kevinbaluha opened this issue Sep 5, 2015 · 0 comments

Comments

@kevinbaluha
Copy link

kevinbaluha commented Sep 5, 2015

I had a word doc and I used the sample. Sample_11_ReadWord2007.php to see it it worked. It returned an error
22:16:05 Reading contents from /var/www/getverified/V/PHPWord/samples/resources/Sample_11_ReadWord2007.docx
22:16:05 error ...exception 'BadMethodCallException' with message 'Cannot add PreserveText in Section.' in /var/www/getverified/V/PHPWord/src/PhpWord/Element/AbstractContainer.php:228
Stack trace:
#0 /var/www/getverified/V/PHPWord/src/PhpWord/Element/AbstractContainer.php(130): PhpOffice\PhpWord\Element\AbstractContainer->checkValidity('PreserveText')
#1 [internal function]: PhpOffice\PhpWord\Element\AbstractContainer->addElement('PreserveText', '{ FORMCHECKBOX ...', NULL, Array)
#2 /var/www/getverified/V/PHPWord/src/PhpWord/Element/AbstractContainer.php(112): call_user_func_array(Array, Array)
#3 /var/www/getverified/V/PHPWord/src/PhpWord/Reader/Word2007/AbstractPart.php(139): PhpOffice\PhpWord\Element\AbstractContainer->__call('addPreserveText', Array)
#4 /var/www/getverified/V/PHPWord/src/PhpWord/Reader/Word2007/AbstractPart.php(139): PhpOffice\PhpWord\Element\Section->addPreserveText('{ FORMCHECKBOX ...', NULL, Array)
#5 /var/www/getverified/V/PHPWord/src/PhpWord/Reader/Word2007/Document.php(160): PhpOffice\PhpWord\Reader\Word2007\AbstractPart->readParagraph(Object(PhpOffice\PhpWord\Shared\XMLReader), Object(DOMElement), Object(PhpOffice\PhpWord\Element\Section))
#6 /var/www/getverified/V/PHPWord/src/PhpWord/Reader/Word2007/Document.php(58): PhpOffice\PhpWord\Reader\Word2007\Document->readWPNode(Object(PhpOffice\PhpWord\Shared\XMLReader), Object(DOMElement), Object(PhpOffice\PhpWord\Element\Section))
#7 /var/www/getverified/V/PHPWord/src/PhpWord/Reader/Word2007.php(94): PhpOffice\PhpWord\Reader\Word2007\Document->read(Object(PhpOffice\PhpWord\PhpWord))
#8 /var/www/getverified/V/PHPWord/src/PhpWord/Reader/Word2007.php(69): PhpOffice\PhpWord\Reader\Word2007->readPart(Object(PhpOffice\PhpWord\PhpWord), Array, 'Document', '/var/www/getver...', 'word/document.x...')
#9 /var/www/getverified/V/PHPWord/src/PhpWord/IOFactory.php(78): PhpOffice\PhpWord\Reader\Word2007->load('/var/www/getver...')
#10 /var/www/getverified/V/PHPWord/samples/Sample_11_ReadWord2007.php(13): PhpOffice\PhpWord\IOFactory::load('/var/www/getver...')
#11 {main}

i then thought maybe its my document so i used the document from the sample - for checkboxes - it did the same thing.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@kevinbaluha kevinbaluha changed the title CheckBox can be read CheckBox can't be read Sep 7, 2015
@troosan troosan closed this as completed Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants