Forums / Developer / Download a PDF File

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

eZ debug

Timing: Jan 18 2025 15:58:14
Script start
Timing: Jan 18 2025 15:58:14
Module start 'content'
Timing: Jan 18 2025 15:58:14
Module end 'content'
Timing: Jan 18 2025 15:58:15
Script end

Main resources:

Total runtime0.2409 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.6094180.8438
Module start 'content' 0.00540.0057 768.453197.8359
Module end 'content' 0.01110.2297 866.2891526.4844
Script end 0.2408  1,392.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.3835200.0002
Check MTime0.00130.5396200.0001
Mysql Total
Database connection0.00070.275610.0007
Mysqli_queries0.195681.16741410.0014
Looping result0.00130.55201390.0000
Template Total0.229395.210.2293
Template load0.00100.399710.0010
Template processing0.228394.769910.2283
Override
Cache load0.00060.246910.0006
Sytem overhead
Fetch class attribute can translate value0.00090.361110.0009
XML
Image XML parsing0.00020.090010.0002
General
dbfile0.00321.3235200.0002
String conversion0.00000.002130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs