Forums / General / Problem with PDF images

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.

eZ debug

Timing: Jan 18 2025 11:11:32
Script start
Timing: Jan 18 2025 11:11:32
Module start 'content'
Timing: Jan 18 2025 11:11:33
Module end 'content'
Timing: Jan 18 2025 11:11:33
Script end

Main resources:

Total runtime0.8764 sec
Peak memory usage4,096.0000 KB
Database Queries218

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.7188180.8516
Module start 'content' 0.00700.6991 769.5703649.8125
Module end 'content' 0.70610.1702 1,419.3828348.4531
Script end 0.8763  1,767.8359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5011210.0002
Check MTime0.00190.2157210.0001
Mysql Total
Database connection0.00070.078210.0007
Mysqli_queries0.766487.45172180.0035
Looping result0.00320.36392160.0000
Template Total0.843196.220.4216
Template load0.00200.231320.0010
Template processing0.841195.977720.4206
Template load and register function0.00010.016410.0001
states
state_id_array0.00140.162010.0014
state_identifier_array0.00090.108120.0005
Override
Cache load0.00190.2146620.0000
Sytem overhead
Fetch class attribute can translate value0.00200.224130.0007
Fetch class attribute name0.00120.1335130.0001
XML
Image XML parsing0.00140.158330.0005
class_abstraction
Instantiating content class attribute0.00010.0080220.0000
General
dbfile0.00250.2810320.0001
String conversion0.00000.000730.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
11content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
11content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 50
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs