PDFlib for PDF export

Author Message

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

Vincent Saulnier

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?

Kåre Køhler Høvik

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' );

Kåre Høvik

Vincent Saulnier

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();

Vincent Saulnier

Thursday 09 October 2003 7:27:41 am

Kåre ....

anybody has an idea?

Kåre Køhler Høvik

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.

Kåre Høvik

Vincent Saulnier

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.....

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:11:03
Script start
Timing: Jan 18 2025 22:11:03
Module start 'layout'
Timing: Jan 18 2025 22:11:03
Module start 'content'
Timing: Jan 18 2025 22:11:04
Module end 'content'
Timing: Jan 18 2025 22:11:04
Script end

Main resources:

Total runtime1.0832 sec
Peak memory usage4,096.0000 KB
Database Queries77

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.8984152.6094
Module start 'layout' 0.00660.0038 740.507839.4141
Module start 'content' 0.01041.0714 779.9219646.4609
Module end 'content' 1.08180.0014 1,426.382820.8125
Script end 1.0832  1,447.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3031160.0002
Check MTime0.00130.1218160.0001
Mysql Total
Database connection0.00150.137510.0015
Mysqli_queries1.001492.4495770.0130
Looping result0.00080.0751750.0000
Template Total1.048196.820.5240
Template load0.00240.224020.0012
Template processing1.045796.534920.5228
Template load and register function0.00030.026210.0003
states
state_id_array0.00110.102510.0011
state_identifier_array0.00080.069320.0004
Override
Cache load0.00220.1985590.0000
Sytem overhead
Fetch class attribute can translate value0.00050.048630.0002
Fetch class attribute name0.00160.1453110.0001
XML
Image XML parsing0.00150.134230.0005
class_abstraction
Instantiating content class attribute0.00000.0026130.0000
General
dbfile0.00100.0968210.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs