Problem with PDF images

Author Message

Jack Rackham

Wednesday 20 April 2005 5:33:09 am

I have still not been able to solve my image problem with PDF export.
I have tried to "upgrade" my PDF image settings from the old 3.4/3.3 export PDF image templates, to the new 3.5 settings but it's not working. Is there an image bug in the PDF export?

Another problem is that the export PDF sometimes creates dual lines breaks instead on a single line break. Is this too an issue in 3.5 or is it caused by a bug in the old standard templates.

Kåre Køhler Høvik

Wednesday 20 April 2005 7:17:13 am

Hi

How are you trying to display the images ( object attributes, or related objects in XML text ) ?

The double linebreak is still an issue I'm afraid.

Kåre Høvik

Jack Rackham

Wednesday 20 April 2005 7:31:47 am

related objects in XML text

Kåre Køhler Høvik

Wednesday 20 April 2005 7:48:49 am

You need to create a template override for embeded image objects, please see : http://www.ez.no/ez_publish/documentation/incoming/pdf_export_tutorial ( search for "display images" )

Kåre Høvik

Jack Rackham

Wednesday 20 April 2005 7:57:09 am

I have already got an override template for embed images, and I have tried to override it with the "new one"* but it's not working.

*
old one

{default image_class=large
         hspace=false()
	 align="center"
         border_size=0}
{let image_attribute=$object.data_map.image
     image_content=$image_attribute.content}

  {section show=is_set($attribute_parameters.align)}
    {set align=$attribute_parameters.align}
  {section-else}
    {set align="center"}
  {/section}

  {let image=$image_content[$image_class]}

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

  {/let}
{* {/section} *}
{/let}
{/default}

new override

{default image_class=large
         alignment=false()
         hspace=false()
         border_size=0}
{let image_attribute=$object.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}

Jack Rackham

Wednesday 20 April 2005 8:00:12 am

What is the "table of contents" override? Is this something new you people have added to documentation since last week!

Kåre Køhler Høvik

Wednesday 20 April 2005 8:09:23 am

TOC : no, no changes has been done to that doc. page for several months.

Image :
Are the names of the images displayed in the PDF, or nothing at all ?
Have you installed GD or ImageMagick ?
Which OS are you using ?
What format are the images ( image type, and depth ) ?

Kåre Høvik

Jack Rackham

Wednesday 20 April 2005 8:19:27 am

- Are the names of the images displayed in the PDF:Yes
- ImageMagick(using) and GD
- OS SUSE 9.2 apache2
- .JPG

Kåre Køhler Høvik

Wednesday 20 April 2005 8:34:08 am

If the object name is still displayed, the template override does not work. Make sure to clear the cache, and the override definition is in the correct override.ini.append... file.

Kåre Høvik

Jack Rackham

Wednesday 20 April 2005 8:43:55 am

Overide:

[pdf_article_main]
Source=node/view/pdf.tpl
MatchFile=pdf/article/main.tpl
Match[class_identifier]=article
Subdir=templates

[pdf_article_title]
Source=content/datatype/pdf/ezstring.tpl
MatchFile=pdf/article/title.tpl
Match[class_identifier]=article
Match[attribute_identifier]=title
Subdir=templates

[pdf_article_author]
Source=content/datatype/pdf/ezauthor.tpl
MatchFile=pdf/article/author.tpl
Match[class_identifier]=article
Match[attribute_identifier]=author
Subdir=templates

[pdf_article_xml_headers]
Source=content/datatype/pdf/ezxmltags/header.tpl
MatchFile=pdf/article/xml_header.tpl
Match[class_identifier]=article
Subdir=templates

[pdf_article_xml_paragraph]
Source=content/datatype/pdf/ezxmltags/paragraph.tpl
MatchFile=pdf/article/xml_paragraph.tpl
Match[class_identifier]=article
Subdir=templates

[pdf_article_footer]
Source=content/pdf/footer.tpl
MatchFile=pdf/article/footer.tpl
Match[class_identifier]=article
Subdir=templates

[pdf_article_embed_image]
Source=content/pdf/embed.tpl
MatchFile=pdf/article/image.tpl
Match[class_identifier]=article
Subdir=templates

Cache clears right. I have a file called pdf.ini.append.php do you think it's this file that causes the problem?

pdf.ini.append.php

<?php /* #?ini charset="utf8"?

*/ ?>

Jack Rackham

Wednesday 20 April 2005 12:40:44 pm

As I suspected all along there is a bug in the PDF export, because when any of the override is set to override a specific class like in my config, then the images don't work.

I also found out that the dual line error is caused by the xml_paragraph override, so I removed it.

xml_paragraph.tpl

{pdf(newline)}
{pdf(text,$content|wash(pdf), hash( align, full ) )}
{pdf(newline)}

When this is said there are still a few issues that remain unsolved in the PDF export.
- Image comments are not shown
- Still no support for right image size and image align.

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 16:14:36
Script start
Timing: Jan 18 2025 16:14:36
Module start 'layout'
Timing: Jan 18 2025 16:14:36
Module start 'content'
Timing: Jan 18 2025 16:14:36
Module end 'content'
Timing: Jan 18 2025 16:14:36
Script end

Main resources:

Total runtime0.0200 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.8828152.6094
Module start 'layout' 0.00540.0023 740.492239.4141
Module start 'content' 0.00770.0103 779.9063105.3984
Module end 'content' 0.01800.0019 885.304746.3047
Script end 0.0200  931.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002512.3929140.0002
Check MTime0.00115.2496140.0001
Mysql Total
Database connection0.00073.524010.0007
Mysqli_queries0.002210.755430.0007
Looping result0.00000.054810.0000
Template Total0.00157.310.0015
Template load0.00084.173510.0008
Template processing0.00063.149810.0006
Override
Cache load0.00062.814910.0006
General
dbfile0.00031.475480.0000
String conversion0.00000.031040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs