tcpdf class -pdf cache problems

Author Message

Sergi A

Thursday 09 December 2010 3:45:18 am

Hi! i'm using the tcpdf extension on a 4.2 ezPublish installation... i am able to create the pdf content, but after creating it, on the next html-page served the html code is mixed with pdf code.. so the browser crashes. It doesn't happens every time, and when it happens it is only the next page served, then it works again.

Could it be some cache problems? Maybe the pdf code is cached and then mixed with html code...on this mixed code, i can see the pdf headers on the last lines of the html page (and just before the pdf code itseld)

HTTP/1.1 200 OK
Date: Thu, 09 Dec 2010 11:38:22 GMT
Server: Apache/2.2.12 (Ubuntu)
X-Powered-By: eZ Publish
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Thu, 09 Dec 2010 11:38:22 GMT
Served-by: localhost
Content-language: cat-ES
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 6577
Keep-Alive: timeout=15, max=96
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8

i'm really stuck in this problem..

thanks!

Ivo Lukac

Thursday 09 December 2010 4:00:39 am

We have good experience with http://projects.ez.no/paradoxpdf

So try that extension if you can't solve your current problem...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Sergi A

Thursday 09 December 2010 4:02:39 am

"

We have good experience with http://projects.ez.no/paradoxpdf

So try that extension if you can't solve your current problem...

"

thanks, but it needs java and i'm not able to use it :/

Sergi A

Thursday 09 December 2010 4:24:58 am

I noticed that, when the wrong html page is served, the $module_result.uri is that of the pdf view page, not the one being served... i don't understand it..

every ez url is changed by this one:

"/en/tcpdf/artykul/objectid/645/nodeid/406"

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 02:12:20
Script start
Timing: Jan 18 2025 02:12:20
Module start 'layout'
Timing: Jan 18 2025 02:12:20
Module start 'content'
Timing: Jan 18 2025 02:12:21
Module end 'content'
Timing: Jan 18 2025 02:12:21
Script end

Main resources:

Total runtime0.7340 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.0469152.6250
Module start 'layout' 0.00660.0048 741.671939.4531
Module start 'content' 0.01140.7214 781.1250552.0156
Module end 'content' 0.73270.0012 1,333.140612.1641
Script end 0.7340  1,345.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4863160.0002
Check MTime0.00150.1979160.0001
Mysql Total
Database connection0.00080.115710.0008
Mysqli_queries0.680492.7016620.0110
Looping result0.00060.0820600.0000
Template Total0.700095.420.3500
Template load0.00170.237820.0009
Template processing0.698295.126120.3491
Template load and register function0.00020.024110.0002
states
state_id_array0.00120.161610.0012
state_identifier_array0.00100.132220.0005
Override
Cache load0.00150.2038230.0001
Sytem overhead
Fetch class attribute can translate value0.00090.116520.0004
Fetch class attribute name0.00100.138450.0002
XML
Image XML parsing0.00060.083920.0003
class_abstraction
Instantiating content class attribute0.00000.001750.0000
General
dbfile0.00080.1087170.0000
String conversion0.00000.001740.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs