text in pdf version of article wrong output

Author Message

Dominik LEE

Saturday 23 May 2009 3:23:12 pm

After upgrading to 4.0.1 to 4.1.1 , the pdf version of my articles (the xml block) comes out without space and with tags

see example :

<p>Le7avril,entantqu'ambassadeurdebonnevolontédel'Organisationmond
ialedelaSanté(OMS),JetLi,célèbreacteurdeKungfu,aparticipépourlapremi
èrefoisàlacérémoniedelancementdelaJournéemondialedelaSanté2009,
organiséedansl'hôpitaldeDitan(templedelaTerre)deBeijing.JetLiavaitétén
ommé,le3avril,ambassadeurdebonnevolontéparMargaretChan,directrice
généraledel'OMS.</p>

my pdf article main template :

{*?template charset=utf-8?*}
{let article=$node.contentobject_version_object
     node_name=$node.name}

  {pdf(pageNumber, hash( identifier, "main",
                         start, 1 ) )}

{attribute_pdf_gui attribute=$article.data_map.title}

{default image_class=medium
         alignment=false()
         hspace=false()
         border_size=0}
{let image_attribute=$article.data_map.image
     image_content=$image_attribute.content}
  {let image=$image_content[$image_class]}

       {pdf(image,hash(src,$image.full_path,
                       width,$image.width,
		       height,$image.height,
		       border,$border_size))}

  {/let}
{/let}
{/default}


{attribute_pdf_gui attribute=$article.data_map.intro}

{attribute_pdf_gui attribute=$article.data_map.body}

{pdf(pageNumber, hash( identifier, "main",
                       stop, 1 ) )}

{include uri="design:content/pdf/footer.tpl" node=$node}

{/let}

Is this a bug ?

Desislava Kioseva

Wednesday 12 August 2009 2:36:06 am

Hi ,
I'm newer here but let's back on main goal.

I have the same problem as Dominik LEE.
I create a class with attributes : text_line (title), xml_block (body) etc. So when i try to export my page as PDF it comes out without space between elements (header,body,footer etc.) and the main problem is that all tags like <p></p>, <h3>, <a></a> etc. appeared too.

I think it's no needed to gave an example cause it's the same as Dominik gaves.
So please if someone has a good solution or know is this kind of bug let replay.

It's bit urgent.
Thanks guys.

Pierre SCALFATI

Monday 05 October 2009 9:27:17 am

same for me after upgrade from 4.0 to 4.1...I put a post to ask help about this. So if someone can give us a clue...

Many thanks.

Sandra Parente

Tuesday 06 October 2009 12:14:31 am

Use this extension: http://projects.ez.no/paradoxpdf
It works perfectly and it is easy to install.

Sandra Parente
www.netbliss.it

Pierre SCALFATI

Tuesday 06 October 2009 12:47:31 am

Hi Sandra,

The problem with this extension is that it needs Java JRE installation on our server (which doesn't suit our administrator) and it's really incredible that we cannot find any other easy way to make pdf parsing work as it was between two versions of EZP. The 4.0 version is not so old ... Why can't we make it work after a simple upgrade of version ?

I'm really waiting for some explanation about this fact because I'm sure that the solution mustn't be so complicated. For the moment text fields and images display well, it's only the XML Block data type fields which are not interpreted.

Sandra Parente

Tuesday 06 October 2009 6:34:09 am

The answer is in this post:
http://ez.no/developer/forum/developer/pdf_export__1/re_pdf_export

This is the contribution based on the PHP library TCPDF:
http://ez.no/developer/contribs/applications/simple_pdf_generator

Hope it helps.

Sandra Parente
www.netbliss.it

Pierre SCALFATI

Wednesday 07 October 2009 12:22:38 am

Hello Sandra,

Nice references, thank you very much, I'm working for the moment on TCPDF, but I think that I will have to change the php code to make it fit my desire...Anyhow, I've been able to display something more less correct making some light changes on the code...

Many, many thanks to you !!!

Cheers.

Pierre SCALFATI

Wednesday 07 October 2009 6:06:56 am

Hello,

For those of you who have chosen to work with tcpdf don't forget to get the latest versions of tcpdf.php class if you don't want to have the same troubles I got when using the tcpdf contrib which is available on ez.no. In this contrib version, the tcpdf class has some bugs for example on text-wraping which makes your words cut improperly at the end of paragraph. I used a tcpdf version 4.8.009 to fix this bug and now my pdf works fine.

Cheers.

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 11:43:55
Script start
Timing: Jan 18 2025 11:43:55
Module start 'layout'
Timing: Jan 18 2025 11:43:55
Module start 'content'
Timing: Jan 18 2025 11:43:56
Module end 'content'
Timing: Jan 18 2025 11:43:56
Script end

Main resources:

Total runtime0.8797 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.1797152.6406
Module start 'layout' 0.00510.0034 741.820339.4766
Module start 'content' 0.00850.8697 781.2969668.5625
Module end 'content' 0.87820.0015 1,449.859416.1250
Script end 0.8796  1,465.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3885160.0002
Check MTime0.00170.1883160.0001
Mysql Total
Database connection0.00070.082610.0007
Mysqli_queries0.810992.1788760.0107
Looping result0.00090.1007740.0000
Template Total0.845596.120.4227
Template load0.00200.228820.0010
Template processing0.843495.881420.4217
Template load and register function0.00010.015210.0001
states
state_id_array0.00120.137810.0012
state_identifier_array0.00120.141120.0006
Override
Cache load0.00180.2069460.0000
Sytem overhead
Fetch class attribute can translate value0.00080.094940.0002
Fetch class attribute name0.00320.366590.0004
XML
Image XML parsing0.00090.106340.0002
class_abstraction
Instantiating content class attribute0.00000.0023100.0000
General
dbfile0.00090.0983160.0001
String conversion0.00000.001540.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/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
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs