|
From: <php...@li...> - 2009-03-02 18:10:23
|
Try,
try{
$report = $birtReportEngine->openReportDesign("${here}/TopNPercent.rptdesign");
$task = $birtReportEngine->createRunAndRenderTask($report);
$taskOptions = new java("org.eclipse.birt.report.engine.api.PDFRenderOption");
$outputStream = new java("java.io.ByteArrayOutputStream");
$taskOptions->setOutputStream($outputStream);
$taskOptions->setOutputFormat("pdf");
$task->setRenderOption( $taskOptions );
$task->run();
$task->close();
} catch (JavaException $e) {
echo $e; //"Error Calling BIRT";
}
//echo $outputStream;
echo java_values($outputStream->toByteArray());
?>
We also have an updated version using 2.3.1 here:
at http://www.birt-exchange.com/devshare/deploying-birt-reports/743-calling-birt-from-php/
Jason
________________________________
From: php...@li... [mailto:php...@li...]
Sent: Mon 3/2/2009 8:20 AM
To: php...@li...
Subject: [Php-java-bridge-users] Birt generating blank PDF reports
I'm having a problem generating reports in PDF format using the new
BIRT reporting in 5.4.3.2.
The report generates perfectly in html, but when I change the output
format to pdf, I get a blank pdf file (it appears to be a valid file,
it just contains no text). No errors showing up anywhere that I can
see (even with logging set to debug).
The problem is easily reproduced, just change
$options->setOutputFormat($options->OUTPUT_FORMAT_HTML);
to
$options->setOutputFormat($options->OUTPUT_FORMAT_PDF);
in the bundled report.php example file, and change the content-type to
application/pdf.
JavaBridge is running in a 1.6 jvm under tomcat.
Any pointers as to how I should proceed?
Thanks,
Bricky
(I originally posted this from a non-list account, but it doesn't seem
to have come through to the list. Apologies in advance if this leads
to any duplication)
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|