Bug #66092 [NEW]: Adding shadow to border on generated Word document fails

From: Date: Thu, 14 Nov 2013 09:38:53 +0000
Subject: Bug #66092 [NEW]: Adding shadow to border on generated Word document fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182751@lists.php.net to get a copy of this message
From:             adam dot tallon at version1 dot com
Operating system: Windows Server 2008 R2
PHP version:      Irrelevant
Package:          COM related
Bug Type:         Bug
Bug description:Adding shadow to border on generated Word document fails

Description:
------------
Moving from PHP 4 to PHP 5 and the below works fine in PHP 4, now on PHP
5, regardless what version and the below line fails with the error
underneath it. If the line is changed to FALSE it will generate the file
with no border shadow on tables.

@$vTable->Borders->Shadow = TRUE;

Fatal error: Uncaught exception 'com_exception' with message 'Source:
Microsoft Word
Description: Command failed' in genworddoc_class.php:436
Stack trace:
#0 genworddoc_class.php(436): genWordDoc::addFormattedTable7()
#1 genworddoc_class.php(330):
genWordDoc->addFormattedTable7('BULK_TABL...', 1, 5, Array, Array,
Array)
#2 c_generate_correspondence.php(444):
genWordDoc->addTableArrayObjectsToTemplate('BULK_TABL...', Array, Array,
NULL, NULL, Array)
#3 main.php(190): include('C:\htdocs\...')
#4 index.php(6): include('C:\htdocs\...')
#5 {main} thrown in genworddoc_class.php on line 436

Test script:
---------------
$vObjBookmark =
$this->mWord->ActiveDocument->Bookmarks($pBookmarkName);
$vRange = $vObjBookmark->Range;
$vTable = $this->mWord->ActiveDocument->Tables->Add($vRange, 2, 2, 0,
2);
@$vTable->Borders->Shadow = TRUE;
$vTable->AllowAutoFit = 1;
$vTable->AutoFitBehavior(0);

Expected result:
----------------
Generated document with tables that have a border shadow on them.

Actual result:
--------------
No document generated, error thrown in logs at border->shadow line of
code, blank page displayed.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=66092&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=66092&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=66092&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=66092&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=66092&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=66092&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=66092&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=66092&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=66092&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=66092&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=66092&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=66092&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=66092&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=66092&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66092&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=66092&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=66092&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=66092&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66092&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=66092&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66092&r=mysqlcfg



Thread (8 messages)

« previous php.bugs (#182751) next »