Forums / Setup & design / PDF generation in eZ 3.3

PDF generation in eZ 3.3

Author Message

Vivek Chopra

Monday 23 February 2004 10:54:10 am

I have looked around in the documentation and forums but haven't found any article or documentation regarding pdf generation on-the-fly with eZ 3.3. In the admin site if I go into the setup and then into the pdf section, it creates pdf for storage or direct download but I m not sure how to use it.

If anyone has a site that uses using pdf generation in eZ3.3, I would like to take a look before I upgrade to 3.3. Also any help on how to create pdf and how to use them would be really helpful.

Thanks in Advance,
Vivek

Kåre Køhler Høvik

Tuesday 24 February 2004 12:22:37 am

Hi

PDF on the fly is not possible in 3.3, but if you merge in changes done in rev. 4942, it's possible.

write in the root of the eZ publish installation: svn merge -r 4941:4942 http://pubsvn.ez.no/nextgen/trunk

A few minor fixes might be needed as well. ( correct user role settings ).

A small example on altering PDF templates can be found here:
http://www.ez.no/ez_publish/documentation/incoming/pdf_template_operators
http://www.ez.no/ez_publish/documentation/incoming/pdf_export_tutorial

--
Kåre Høvik

Kåre Høvik

Vivek Chopra

Tuesday 24 February 2004 9:39:53 am

Thank you for your reply.

Doesn't the admin site create pdf on the fly?

I will try the directions you gave me.

Thanks again
Vivek

Kåre Køhler Høvik

Tuesday 24 February 2004 11:29:33 pm

The admin pages create PDF on the fly. Update is for creating PDFs on the fly using urls like : content/pdf/<node_id> , just like content/view/<node_id> creates html.

--
Kåre Høvik

Kåre Høvik

Vivek Chopra

Friday 27 February 2004 3:49:47 pm

I have eZ3.3 rev 5019. Do I have to revert back to 4942? how do I do that?

Vivek Chopra

Tuesday 09 March 2004 3:19:11 pm

Kåre,

Looking at the feature on eZ3.4alpha, it seems that PDF generation on the fly has been added. like content/pdf/[nodeid]

I am curently on ez3.1.1 rev 2703 on the prod server and I have eZ3.3 rev 5019 on the testing server. What would you recommend?

Thanks
Vivek

Kåre Køhler Høvik

Wednesday 10 March 2004 12:42:59 am

Hi

To get it working with 3.3, you'll have to do the following :

copy http://pubsvn.ez.no/nextgen/trunk/kernel/content/pdf.php
into : kernel/content/.

add to kernel/content/module.php :

$ViewList['pdf'] = array(
    'functions' => array( 'pdf' ),
    'default_navigation_part' => 'ezcontentnavigationpart',
    'script' => 'pdf.php',
    'params' => array( 'NodeID' ),
    'unordered_params' => array( 'language' => 'Language',
                                 'offset' => 'Offset',
                                 'year' => 'Year',
                                 'month' => 'Month',
                                 'day' => 'Day' )
    );

$FunctionList['pdf'] = array( 'Class' => $ClassID,
                              'Section' => $SectionID,
                              'Owner' => $Assigned,
                              'Node' => $Node,
                              'Subtree' => $Subtree );

Add to kernel/classes/ezcontentcache.php ca line 147 :

        if ( $viewMode == 'pdf' )
        {
            return $cachePath;
        }

I can not guarantee this will work.

You might need to copy this file as well.
http://pubsvn.ez.no/nextgen/trunk/design/standard/templates/node/view/pdf.tpl
(Small changes there)

Remember to add access for users to content/pdf

--
Kåre Høvik

Kåre Høvik