Bad text alignment in PDF

Author Message

Linh Vu

Wednesday 22 June 2005 8:23:40 pm

I've been searching the forums for hours but can't find a solution to this. I'm using ezp 3.5.2 on this site: www.wuxiapedia.com. Been working on the PDF export of articles. The problem is that the PDF export code seems to mess up the text alignment in the original article, i.e entering whitespaces at random inside paragraphs (it's fine between paragraphs).

An example:
Article: http://www.wuxiapedia.com/research/the_arts/xajh_song
PDF: http://www.wuxiapedia.com/content/pdf/242

My xml_paragraph.tpl looks like this:

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

I had to remove the hash(align, full) part because it is exactly the same and even inserts more newlines between paragraphs. Align left does the exact same thing. I suspect it's wash(pdf) causing this as it's supposed to translate whitespaces from postscript codes, but don't know how to fix it. Anyone has an idea? Thanks in advance.

Btw system is LAMP on RH3EL. PHP 4.3.11, MySQL 4.0.24 and Apache 2.0.40.

If I had more time, I would write less code.

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 19 2025 07:18:55
Script start
Timing: Jan 19 2025 07:18:55
Module start 'layout'
Timing: Jan 19 2025 07:18:55
Module start 'content'
Timing: Jan 19 2025 07:18:56
Module end 'content'
Timing: Jan 19 2025 07:18:56
Script end

Main resources:

Total runtime0.5966 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.1563152.6250
Module start 'layout' 0.00550.0035 741.781339.4453
Module start 'content' 0.00900.5861 781.2266468.0703
Module end 'content' 0.59510.0015 1,249.29698.3203
Script end 0.5966  1,257.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5315160.0002
Check MTime0.00140.2271160.0001
Mysql Total
Database connection0.00070.117310.0007
Mysqli_queries0.555893.1603460.0121
Looping result0.00050.0853440.0000
Template Total0.564894.720.2824
Template load0.00200.339620.0010
Template processing0.562894.329020.2814
Template load and register function0.00010.015310.0001
states
state_id_array0.00090.150010.0009
state_identifier_array0.00270.447020.0013
Override
Cache load0.00160.2697120.0001
Sytem overhead
Fetch class attribute can translate value0.00050.086310.0005
Fetch class attribute name0.00060.098120.0003
XML
Image XML parsing0.00050.075610.0005
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00070.1255160.0000
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs