I'm trying to use PrinceXML in my project to generate a PDF to document, I tried to make a simple PDF file with it but does not appear to create a PDF file. So I did a little bit of debugging and tried to run the exe of PrinceXML.
public function executePrincePDF(sfWebRequest $request)
{
$output = system("D:\\Program Files\\xampp\\htdocs\\leave\\lib\\vendor\\prince\\Engine\\bin\prince.exe --version");
echo $output;
return sfView::NONE;
}
But there is no output, I've seen the expected output because I tried running the code above with a plain php file and the output is this:
Prince 8.1 rev 4 Copyright 2002-2012 YesLogic Pty. Ltd. Non-commercial License Non-commercial License
How do I use PrinceXML in Symfony 1.4? Is there something I need to do before I use PrinceXML?
Just use the provided php wrapper class. http://www.princexml.com/download/wrappers/
Rename it to
Prince.class.php
and put it into thelib
directory so symfony will autoload it and read the readme file to see how can you use it.