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

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 19 2025 04:30:56
Script start
Timing: Jan 19 2025 04:30:56
Module start 'layout'
Timing: Jan 19 2025 04:30:56
Module start 'content'
Timing: Jan 19 2025 04:30:58
Module end 'content'
Timing: Jan 19 2025 04:30:58
Script end

Main resources:

Total runtime1.5596 sec
Peak memory usage4,096.0000 KB
Database Queries96

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.1563152.6250
Module start 'layout' 0.00540.0059 741.781339.4453
Module start 'content' 0.01131.5468 781.2266817.0625
Module end 'content' 1.55810.0014 1,598.289132.1641
Script end 1.5595  1,630.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.2463160.0002
Check MTime0.00140.0923160.0001
Mysql Total
Database connection0.00080.049310.0008
Mysqli_queries1.402589.9284960.0146
Looping result0.00130.0845940.0000
Template Total1.504396.520.7522
Template load0.00190.119720.0009
Template processing1.502596.337820.7512
Template load and register function0.00010.007810.0001
states
state_id_array0.00250.162710.0025
state_identifier_array0.01350.865320.0067
Override
Cache load0.00240.15091200.0000
Sytem overhead
Fetch class attribute can translate value0.00300.191050.0006
Fetch class attribute name0.00220.1412180.0001
XML
Image XML parsing0.00250.163450.0005
class_abstraction
Instantiating content class attribute0.00010.0041270.0000
General
dbfile0.00250.1619350.0001
String conversion0.00000.000640.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
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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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