Forum


Replies: 4   Views: 3293
Some error with phpdocx pro
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by marcushjortsberg  · 26-06-2011 - 17:37

I am doing this

[code]require_once '../../classes/CreateDocx.inc';

$docx = new CreateDocx();

$text = 'Lorem ipsum dolor sit amet.';

$docx->addText($text, $paramsText);

$docx->createDocxAndDownload('example_text');[/code]

but when the file is to be created I only get errors from my OFFICE WORD, it says that the file is damaged...

and if I do

[code]$docx = new CreateDocx();

$docx->addText('DOCX content');

$docx->addText('End DOCX content');

$docx->createDocx('example_docx');[/code]

I get an error from my browser, "Fatal error: Class 'JBrowser' not found in /customers/mysite.com/mysite.com/httpd.www/plugins/system/juga.php on line 176 "

(I am using Joomla, and this I am trying to put in a view, I have put it in controller before with success...I can't make any sence of this...)

Posted by marcushjortsberg  · 11-04-2013 - 12:13

Now I have some success...

Now I can send file to browser but there is still some errors...

If I open the file with word it's empty, if I open it with Open Office the same error shows but in the actual file as text...

[code]Fatal error: Class 'JBrowser' not found in /customers/mysite.com/mysite.com/httpd.www/plugins/system/juga.php on line 176[/code]

Help much wanted!

Posted by admin  · 11-04-2013 - 12:13

Hello,

JBrowser is not a phpdocx class, but a Joomla class defined in libraries/joomla/environment/browser.php. You should check your source code, seems there're some 'include' missing.

Test phpdocx standalone to veriffy it's correct implementation.

Regards.

Posted by marcushjortsberg  · 11-04-2013 - 12:13

Yes, I have figured that out:)

But I have not yet got an answer from either the Joomla forum or Dioscouri teams.

I have a php package that makes PDF also in my component and that works just fine.
But with your package this problem appears and I can't figure out what happens...

Does your package call som function somewhere that JUGA also uses?