Forums / Setup & design / text in pdf version of article wrong output

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.

eZ debug

Timing: Jan 18 2025 05:20:35
Script start
Timing: Jan 18 2025 05:20:35
Module start 'content'
Timing: Jan 18 2025 05:20:36
Module end 'content'
Timing: Jan 18 2025 05:20:36
Script end

Main resources:

Total runtime0.9799 sec
Peak memory usage4,096.0000 KB
Database Queries213

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 587.8438180.8125
Module start 'content' 0.00500.7916 768.6563673.6563
Module end 'content' 0.79670.1832 1,442.3125340.4297
Script end 0.9799  1,782.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4456210.0002
Check MTime0.00190.1969210.0001
Mysql Total
Database connection0.00060.058410.0006
Mysqli_queries0.884190.22212130.0042
Looping result0.00260.26472110.0000
Template Total0.950397.020.4752
Template load0.00200.204020.0010
Template processing0.948396.773020.4742
Template load and register function0.00020.016210.0002
states
state_id_array0.00100.103410.0010
state_identifier_array0.00090.090620.0004
Override
Cache load0.00190.1911460.0000
Sytem overhead
Fetch class attribute can translate value0.00230.235150.0005
Fetch class attribute name0.00150.150590.0002
XML
Image XML parsing0.00150.152150.0003
class_abstraction
Instantiating content class attribute0.00000.0023100.0000
General
dbfile0.00580.5927270.0002
String conversion0.00000.000630.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs