Forums / Developer / Generating PDF files on the fly

Generating PDF files on the fly

Author Message

Eirik Alfstad Johansen

Saturday 23 October 2004 2:16:46 am

Hi guys,

I'm trying to learn a little something about generating PDF files on the fly. My problem is this:

When I do content/pdf/[node_id] on my demo site running 3.4.2, I'm asked to open a file named [node_id] of the file type Adobe Acrobat Control for Active X.

However, when I select "Open", I get the error msg:

[error_msg]
Can not download [node_id] from www.demosite.com.

Can not open this Internet area. The area in question is either unavailable, or does not exist. Try again later.
[/error_msg]

Am I missing something here?

Thanks in advance !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Ekkehard Dörre

Saturday 23 October 2004 6:12:13 am

Hi,
click
http://demo.ezpublish.no/news/content/pdf/82
is this works,:
1. Check permissions in ezPublish
2. Check URL
if not
2. Try another Browser not IE. e.g. Firefox or Mozilla or Opera or Safari or Konquerer

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Eirik Alfstad Johansen

Saturday 23 October 2004 6:34:56 am

Hi ekke,

Thanks a lot for helping me out. When I click the URL you provided, I do get a PDF document. However, I can't seem to figure out how this URI is constructed. What is the syntax?

Thanks in advance !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Saturday 23 October 2004 6:44:36 am

Hi ekke,

After examining my own demo site, I discovered that the "news" part is the name of the siteaccess and not a module nor a node. So I guess I should use content/pdf/[node_id] as the URI. However, this only works for nodes of the article class. Shouldn't there be a fallback PDF template for nodes of other classes as well?

Thanks in advance !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Saturday 23 October 2004 6:52:58 am

Hi again,

I'm sorry for posting so many times, but I wouldn't want you to spend time answering something I've already discovered myself.

This is where I'm at:

When I go to nyheter/latest_updates_from_us on my demo site and click the "Download a PDF version of this page" link, the PDF appears as supposed to. However, if I copy and paste the exact same URL (http://ezpdemo.netmaking.no/index.php/content/pdf/80) into the URL field of the web browser, I get the error as described in my first post.

How can the URL be treated differently depending on whether I click a link or copy'n'paste it into the URL field?!

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Marco Zinn

Saturday 23 October 2004 10:50:02 am

Hi Eirik,

just to let you know: When i open the URL, that you just posted, i get a very nice PDF in my Firefox browser.
Your PDF even looks better than the one from demo.ezpublish.no

Marco
http://www.hyperroad-design.com

Eirik Alfstad Johansen

Sunday 24 October 2004 2:57:31 am

Hi Marco,

Did you click the link, or copy'n'paste it into the URL bar? It actually makes a difference in my IE 6.0.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Ekkehard Dörre

Sunday 24 October 2004 7:55:36 am

IE 6.0 problem. Click on link works, via addressbar not.

Look, the header is in both cases OK, wondering if not ;-)
So the result should be the same.
Copy in bar:

http://demo.ezpublish.no/news/content/pdf/82

GET /news/content/pdf/82 HTTP/1.1
Host: demo.ezpublish.no

HTTP/1.x 200 OK

Last-Modified: xxx
Content-Language: eng-GB
Content-Length: 2044
Content-Transfer-Encoding: binary
Accept-Ranges: bytes

Content-Type: application/pdf
----------------------------------------------------------
Click on link:
http://demo.ezpublish.no/news/content/pdf/82

GET /news/content/pdf/82 HTTP/1.1

HTTP/1.x 200 OK

Content-Language: eng-GB
Content-Length: 2044
Content-Transfer-Encoding: binary
Accept-Ranges: bytes

Content-Type: application/pdf
----------------------------------------------------------

So it should depends on the new security settings after new "Service Pack" 2
Your ActiveX is, when clicking link, more thrusty (Different Security Zone) then via direkt input. This makes no sense for You? -> market leader

Greetings ekke

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Ekkehard Dörre

Sunday 24 October 2004 8:20:34 am

... and about "funny results" while surfing IE from Tom Liston:

Follow the Bouncing Malware - Part I
http://isc.sans.org/diary.php?date=2004-07-23
german: http://www.heise.de/security/artikel/49687

Follow the Bouncing Malware - Part II
http://isc.sans.org/diary.php?date=2004-08-23
german: http://www.heise.de/security/artikel/50377

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Paul Forsyth

Sunday 24 October 2004 10:08:35 am

I've hit ie sp2 problems before. I havent seen this particular problem though.

http://ez.no/community/forum/developer/ie_xp_sp2_crashes

paul

Norman Leutner

Monday 25 October 2004 11:50:27 pm

Nice Service Pack ;)

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Eirik Alfstad Johansen

Tuesday 26 October 2004 2:50:51 am

[quote]
I've hit ie sp2 problems before. I havent seen this particular problem though.
[/quote]

Actually, this problem occured on a machine which hasn't got SP2 installed yet.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Ekkehard Dörre

Monday 22 November 2004 7:22:26 am

... and more about "funny results" while surfing IE from Tom Liston:

Follow the Bouncing Malware - Part III
http://isc.sans.org//diary.php?date=2004-11-04
german: http://www.heise.de/security/artikel/52988

Greetings ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Ekkehard Dörre

Thursday 02 December 2004 5:37:13 am

... and Part IV, then information is complete:

Follow the Bouncing Malware - Part IV
http://isc.sans.org/diary.php?date=2004-11-24

Schädlingen auf der Spur - Teil IV
http://www.heise.de/security/artikel/53746

Greetings ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

eZ debug

Timing: Jan 19 2025 01:15:41
Script start
Timing: Jan 19 2025 01:15:41
Module start 'content'
Timing: Jan 19 2025 01:15:42
Module end 'content'
Timing: Jan 19 2025 01:15:43
Script end

Main resources:

Total runtime1.1358 sec
Peak memory usage4,096.0000 KB
Database Queries233

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 590.0859180.8359
Module start 'content' 0.00821.0059 770.9219822.1406
Module end 'content' 1.01410.1216 1,593.0625361.3125
Script end 1.1357  1,954.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.3915210.0002
Check MTime0.00160.1411210.0001
Mysql Total
Database connection0.00100.084110.0010
Mysqli_queries1.009988.91592330.0043
Looping result0.00290.25162310.0000
Template Total1.103497.120.5517
Template load0.00250.221820.0013
Template processing1.100996.922020.5504
Template load and register function0.00010.013110.0001
states
state_id_array0.00100.084810.0010
state_identifier_array0.00150.129020.0007
Override
Cache load0.00230.20071200.0000
Sytem overhead
Fetch class attribute can translate value0.00150.135060.0003
Fetch class attribute name0.00160.1404180.0001
XML
Image XML parsing0.00260.225860.0004
class_abstraction
Instantiating content class attribute0.00010.0054270.0000
General
dbfile0.00310.2762460.0001
String conversion0.00000.000730.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
13content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
14content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
29content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
17content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 75
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs