Something like Crystal Reports for PHP?

2019-01-16 02:58发布

I'm looking for something that works in PHP and is similar to crystal reports. I basically need to have a layout setup that means I can output invoices just by inserting the data, and then send it to a printer.

The closest I've found so far is PDFB, but It's a bit of a pain as it needs to have precise positioning.

I'd like to have something that could generate an invoice based on a template (preferably XML based) and then output it to a form easy for us to print (PostScript would be nice!)

It needs to have support for barcodes too (though these can be generated as a GD image)

Another requirement is that this must be FLOSS

12条回答
\"骚年 ilove
2楼-- · 2019-01-16 03:26

Try Tufat

I just happen to see that ..may be it will help you. However there is a free version is available for you to test.

You will like it .. Please share your copy.

查看更多
叛逆
3楼-- · 2019-01-16 03:27

Use XML + XSL:FO with Apache FOP via PHP-JavaBridge.

Here is how: http://wiki.apache.org/xmlgraphics-fop/HowTo/PHPJavaBridge

PostScript would be nice!

Many PostScript printers understand PDF too.

查看更多
再贱就再见
4楼-- · 2019-01-16 03:27

I ran into the same problem about a year ago. After searching all over for an existing solution I didn't find one, so I wrote a slimmed-down crystal reports using Zend Framework's PDF generation library. I had to heavily adapt their library to support grouped objects, repeating sections and templates. It worked, but it was really clunky, and if I had to do it again, I would find a way to bridge php to crystal reports, either through a web service like Gushiken said, or by calling a command-line app. CPAN has a Perl interface to C.R.: Win32::OLE::CrystalRuntime::Application .

If a PHP solution has been released in the past year, I doubt it is mature enough to compare to C.R. Don't waste your time pulling your hair out -- go with what works. Time is expensive. Software ain't.

查看更多
叛逆
5楼-- · 2019-01-16 03:34

I have used the eclpse in php: "BIRT Project"

http://www.eclipse.org/birt/phoenix/

You design your report in Eclipse. Then upload it to your server (it must be running tomcat) I know. Then you can call that report from your php application you can send the parameters to the report through the query string:

/myreport.birt?param=var&param2=var2

We have a 4 year application working like this so far. Around a 100 reports and it works really well.

Of course it is open source.

Good luck

查看更多
你好瞎i
6楼-- · 2019-01-16 03:37

If you manage to call a Java application in your php-environment (which in general should be possible) JasperReports maybe the thing you are looking for:

查看更多
乱世女痞
7楼-- · 2019-01-16 03:43

If you have server access you might also like to go for XSL Formatting Objects through Apache FOP. XSL-FO is XML based and supports alot of output formats including PostScript and PDF

查看更多
登录 后发表回答