Forums / Developer / PDFlib for PDF export
Vincent Saulnier
Tuesday 07 October 2003 12:41:25 pm
I'm in need of a way to create pdf.It doesn't need to work with the content module.
To clarify:
I created a independent module for printing quotes and I would like to create PDF to view these quotes. In my own module, I added a view to do this. In this view I changed the header and added the PDFlib code but doesn't work.
I've done it with eZ 2.2.x and I want to do it with eZ3.2.
Can anybody help me with this?
Kåre Køhler Høvik
Wednesday 08 October 2003 12:38:20 am
PDF export will be added to eZ publish 3.3. Check the latest development version at http://pubsvn.ez.no/ for some very basic PDF support. This is still in early development, but might be easier to build your solution on than the PDFlib.
update: Some fonts required to get the PDF in eZ publish have not been comitted yet, due to uncertain copyright restrictions. This will be fixed in the final release.
Kåre Høvik
Tony Wood
Wednesday 08 October 2003 4:43:33 am
Vincent,
we looked at using PDFLib but they charge by the CPU so it can get pricey real quick.
Tony
Tony Wood : twitter.com/tonywood Vision with Technology Experts in eZ Publish consulting & development Power to the Editor! Free eZ Training : http://www.VisionWT.com/training eZ Future Podcast : http://www.VisionWT.com/eZ-Future
Wednesday 08 October 2003 6:24:26 am
I understand that and i do not expect eZ Systems to worry about pdflib compatibility for pdf export. There is no need to do that.
My problem is that I'm not able to access to any INI configuration with a seperate file that doesn't use index.php.
I tried to copie dome of the code of index.php to my separate file, no success.
What should I do?
Wednesday 08 October 2003 7:54:09 am
check ./runcronjobs.php for standalone ini access. Basicly all you need to access the site.ini with overrides is this :
include_once( 'lib/ezutils/classes/ezini.php' );$ini = eZIni::instance( 'site.ini' );
Wednesday 08 October 2003 11:43:38 am
Still can't access the database because the ini instance does'nt work.
I used that :
$script =& eZScript::instance( array( 'debug-message' => '', 'use-session' => true, 'use-modules' => true, 'use-extensions' => true, 'user' => true) );
$script->startup();
$script->setUseDebugOutput( false ); $script->setAllowedDebugLevels( false); $script->setUseDebugAccumulators( false ); $script->setUseDebugTimingPoints( false);$script->setUseIncludeFiles( true );
$script->setUseSiteAccess( 'siteaccess' );$script->initialize();
/* My code */
$script->shutdown();
Thursday 09 October 2003 7:27:41 am
Kåre ....
anybody has an idea?
Thursday 09 October 2003 7:40:00 am
Your User parameter is faulty. See: kernel/classes/ezscript.php::setUser for User parameter format.
If that does not help, its hard to tell whats wrong without more information.
Thursday 09 October 2003 8:01:24 am
I stripped the setUser part and it still doesn't work.
just to inform you that this script is accessible by a URL like that :
http://www.domain.com/extension/name/design/standard/pdf/pdf.phpi?quoteID=3
On my server, I configured the extension .phpi as a php extension so it will be recognised as a php file and will not be absorbed by index.php.
It worked with eZ2.x.....