Developed with love by KnpLabs Hire us for your project!
22

apache-fop

by goetas

Symfony2 Apache FOP Bundle

apache-fop-bundle

Symfony2 Apache FOP (XSL-FO) Bundle

Downloads
Latest Stable Version
Latest Unstable Version
Build Status
Scrutinizer Quality Score

Installing (composer)

Add following lines on your composer.json

"requre":{
"goetas/apache-fop": "1.0.*",
}

Configuration

Add following lines on your config.yml

goetas_apache_fop:
executable: /install_path_to_apache_fop/fop
config: ../../path_to_optional_config_xml

Add this to AppKernel.php

new Goetas\ApacheFopBundle\GoetasApacheFopBundle();

Add this to your autoloader (only if not using composer)

'Goetas\ApacheFopBundle' => $vendorDir . '/goetas/apache-fop/Goetas/GoetasApacheFop/lib/'

Usage

$service = $container->get("goetas.fop");
// convert FO to PDF or RTF
$service->convert("source.fo", "output.pdf", "application/pdf");
$service->convert(new FileInput("source.fo"), "output.pdf", "text/rtf");

//convert to PDF using XML and XSLT and with params
$service->convert("source.xml", "output.pdf", "application/pdf", "transform.xsl", array("paramName"=>"paramValue"));
//convert to PDF using XML and XSLT (reading xsl from string)
$service->convert("source.xml", "output.pdf", "application/pdf", new StringInput(" ... xsl string ..."));

//convert reading a FOP input from a string
$service->convert(new StringInput("source.fo"), "output.pdf", "application/pdf");


//convert reading a FOP input from a string, and get the result
$service->get(new StringInput("... fo data ..."), "application/pdf");

//convert reading a FOP input from a string, and output the result
$service->out(new StringInput("... fo data ..."), "application/pdf");

//convert reading a FO data from a file, and output the result (plus xsl)
$service->out(new FileInput("... fo data ..."), "text/rtf", "transform.xsl", array("paramName"=>"paramValue"));


Bitdeli Badge

  • Merge pull request #8 from citadev/master
    By web-flow, 2 years ago
  • Merge remote-tracking branch 'origin/master'
    By , 2 years ago
  • fix package name and symfony/process requirements
    By citadev, 2 years ago
  • setInput was introduced with symfony 2.5
    By web-flow, 2 years ago
  • change name for using the fork
    By citadev, 2 years ago
  • fix name
    By citadev, 2 years ago
  • Add @return to get method + change runProcess return type hint to Process
    By citadev, 2 years ago
  • Replace setStdin by setInput when using Process clas (symfony 3 compatibility)
    By citadev, 2 years ago
  • change requirements and name
    By citadev, 2 years ago
  • change requirements
    By citadev, 2 years ago
  • Merge pull request #5 from ke20/master
    By goetas, 4 years ago
  • Some mistakes
    By ke20, 4 years ago
  • scruntizer
    By goetas, 5 years ago
  • Add a Bitdeli badge to README
    By bitdeli-chef, 5 years ago
  • Merge pull request #4 from bitdeli-chef/master
    By goetas, 5 years ago
  • travis buiuld status
    By goetas, 5 years ago
  • travis
    By goetas, 5 years ago
  • travis testing
    By goetas, 5 years ago
  • ignores
    By goetas, 5 years ago
  • phpunit
    By goetas, 5 years ago
  • input on get method
    By goetas, 5 years ago
  • Documentation for xsl input interface
    By goetas, 5 years ago
  • documentation + get/out parameters fix
    By goetas, 5 years ago
  • code style
    By goetas, 5 years ago
  • docu
    By goetas, 5 years ago
  • fix callback output
    By goetas, 5 years ago
  • more conversion option
    By goetas, 5 years ago
  • Update composer.json
    By goetas, 6 years ago
  • Update composer.json
    By goetas, 6 years ago
  • Update README.md
    By goetas, 6 years ago