Download a PDF File

Author Message

Edavalath prashanth Narayanan

Thursday 24 November 2005 9:43:32 am

Hi,
While creating an Article ,iam uploading a PDF file along with it (customised the Article class to accomodate the PDF file Upload). The uploaded PDF files resides in var/admin/storage/original/application/ but its not visible in USer site.
I have overrided the full.tpl for the articles and the PDF download link is showing a url "index.php/site-name/content/pdf/252".
Its showing a blank page..

Iam using ez 3.6.1 .

Please help..
Regards

Gurudutt Verma

Thursday 24 November 2005 1:18:05 pm

Hi Edavalath

The link
site url../index.php/site-name/content/pdf/252
is a strong feature of ez publish to convert object/your article in to pdf file, and to view your article in pef format you have to customize your article.

Finnaly your problem is you want to see/download the uploaded pdf file for that you have to look in to proper article and create a override and see if there is something like
{attribute_view_gui attribute=$node.object.data_map.yourattributename}

which will show proper display for your upload file.
and to see that

site url../index.php/site-name/content/view/full/252

All the best :-)

Clemens T

Thursday 24 November 2005 2:02:49 pm

I agree Gurudutt, it's a strong feature of ezpublish. But it still contains loads of bugs/shortcomings(the pdf generating process):.

A good feature for eZ would be (concerning the pdf):

- Creating a normal template
- Render the generated html to a pdf lib
- Stream the created pdf

This would be the best way of ezpublish pdf support. Cause, if you try doing something with bullet lists, tables, images etc etc in the current pdf templates. That's just 'hell'.

Maybe you can comment on this idea.
Thanks!
Clemens

Jones Down

Tuesday 29 November 2005 9:56:40 am

Hi Clemens,

>But it still contains loads of bugs/shortcomings(the >pdf generating process)

could you please give some hints about that problems? I am quit new to ezpublish and did not read anything aboput errors with pdf generation, so maybe I am a marketing victim. Where can i find more info on these errors, what minefileds I am wading into right now???

THANKS!

J.

Nathan Kelly

Tuesday 29 November 2005 3:53:18 pm

Hi Jones, Clemens is right about the PDF feature containing loads of bugs/shortcomings, however depending on what you need to do it is still very able to output a decent file.

The biggest issues are as Clemens said, bulleted lists, tables and images. Some other issues are setting line breaks that are "not" 100 pixels high, lines not rendering where they should and positioning can be tricky also.

I spent about 4 hours setting up my PDF export (basically a formal letterhead layout) and it works pretty well (with a couple of exceptions). So don't be too discouraged, the feature is still very handy if you have a little patience with it.

Cheers!

Pardon me while I burst into flames...

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 16:03:08
Script start
Timing: Jan 18 2025 16:03:08
Module start 'layout'
Timing: Jan 18 2025 16:03:08
Module start 'content'
Timing: Jan 18 2025 16:03:08
Module end 'content'
Timing: Jan 18 2025 16:03:08
Script end

Main resources:

Total runtime0.6860 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.2422152.6094
Module start 'layout' 0.00520.0037 741.851639.4141
Module start 'content' 0.00890.6686 781.2656670.8438
Module end 'content' 0.67750.0085 1,452.109412.1875
Script end 0.6859  1,464.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4554160.0002
Check MTime0.00130.1937160.0001
Mysql Total
Database connection0.00100.139410.0010
Mysqli_queries0.619390.2801690.0090
Looping result0.00070.1046670.0000
Template Total0.653895.320.3269
Template load0.00220.316520.0011
Template processing0.651794.992720.3258
Template load and register function0.00020.024610.0002
states
state_id_array0.00150.214610.0015
state_identifier_array0.00080.115920.0004
Override
Cache load0.00190.2728440.0000
Sytem overhead
Fetch class attribute can translate value0.00080.112450.0002
Fetch class attribute name0.00100.142470.0001
XML
Image XML parsing0.00140.210650.0003
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00090.1323220.0000
String conversion0.00000.001340.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs