Changing repo to the original one
XSL-FO wrapper for InterSystems Caché/Ensemble’s ZEN Reports framework
By using this special ZEN Report class, you can generate PDFs directly from your XSL-FO files (created outside of the ZEN Reports framework), while you will still able to use the HotJVM Render Server feature of InterSystems Caché / Ensemble.
Questions, bug reports, recommendations are highly welcome to Attila.Toth@InterSystems.com
Do $System.OBJ.ImportDir("\<install-dir\>","*.xml","c",.err,1,.list)
OR
Do $System.OBJ.ImportDir("\<install-dir\>","*.cls","c",.err,1,.list)
The wrapper report can either be used via HTTP (i.e.: browser) or programatically on the server.
There are three ways to feed the wrapper with an XSL-FO file:
The wrapper supports the FO -> PDF generation primarily, so it’s recommended to use with one of the following modes:
Usage examples from browser (direct usage of a stream is not implemented in this case):
http://localhost:57772/csp/user/ZEN.Report.FOWrapper.cls?$MODE=pdf&FOFILENAME=c:\fop\in\simple.fo
http://localhost:57772/csp/user/ZEN.Report.FOWrapper.cls?$MODE=pdf&CLASS=ZEN.Report.FOWrapper&METHOD=FO2PDFCallback
Usage examples from command line / Caché Object Script:
Set report = ##class(ZEN.Report.FOWrapper).%New()
Set report.FOStream = streamobject
; parameters: output filename, 2=pdf mode, 0 = don't display FOP-log, 59991 = Render Server port
Do report.GenerateReport("c:\fop\out\simple.pdf", 2, 0, 59991)
Set report = ##class(ZEN.Report.FOWrapper).%New()
Set report.FOFilename = "c:\fop\in\simple.fo"
; parameters: output filename, 2=pdf mode, 0 = don't display FOP-log, 59991 = Render Server port
Do report.GenerateReport("c:\fop\out\simple.pdf", 2, 0, 59991)
Set report = ##class(ZEN.Report.FOWrapper).%New()
Set report.CallbackClass = "ZEN.Report.FOWrapper"
Set report.CallbackMethod = "FO2PDFCallback"
Do report.GenerateReport("c:\fop\out\simple.pdf", 2, 0, 59991)
For addition information look into the class documentation and implementation of the ZEN.Report.FOWrapper class.