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.