Forums / General / PDF image problems

PDF image problems

Author Message

Carl Worswick

Monday 16 May 2005 5:53:04 am

Hi bit of a newbie so sorry about that but I am struggling with my pdf exports. They work and thankfully, through this excellent posting board, I've managed to get rid of the annoying double-lined spacing. However I now have a few problems with images.

They are displayed when, in my articles, I have attached them as related objects, but when I need to upload a Thumbnail - which is much more common for what I need - the image is not displayed. Any idea what I can do? I assume this is the template image.tpl in pdf/article.

many thanks

Kåre Køhler Høvik

Thursday 19 May 2005 12:24:20 am

Hi, please see : http://www.ez.no/ez_publish/documentation/incoming/pdf_export_tutorial . You basicly dneed to do this :

In override.ini.append.php

[embedImage]
Source=content/pdf/embed.tpl
MatchFile=content/pdf/image.tpl
Subdir=templates
Match[class]=5

And add the template for the image :

{* ------- design/<your design>/override/templates/content/pdf/image.tpl ------ *}

{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}

Kåre Høvik