Help needed, remaining line at the top of a generated file

Author Message

johann savalle

Friday 15 July 2005 6:46:28 am

Hello,

I have developped an extension to export html doc to rtf, but my problem is that for some reason, the generated rtf has a new line at the begining of the file, and I dunno where it comes from. I can't get rid of it.

Here is the way, I am generating th file:

the page layout is only :

{let truc=fetch('content', 'node', hash('node_id', $view_doc))}
{rtfgen("plop")}
{/let}

rtfgen return a string with the rtf code, and I change the header somewhere else in the module file.

But, when I open the file, it's not starting with rtf code but with "\x0d\x0a" and then only the rtf code.

And this little detail screw up the whole thing, because then, wordpad is diplaying the rtfcode as text instead of interpreting it.

If someone could help, I dunno, this is really a pain in the neck really, because it the very last thing to make it work...

any help is welcome :)

johann.

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

Main resources:

Total runtime0.6936 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.0082 589.2891152.6563
Module start 'layout' 0.00820.0052 741.945339.5078
Module start 'content' 0.01340.6787 781.4531401.3203
Module end 'content' 0.69210.0015 1,182.77348.0938
Script end 0.6936  1,190.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4758160.0002
Check MTime0.00130.1931160.0001
Mysql Total
Database connection0.00150.215310.0015
Mysqli_queries0.639392.1674460.0139
Looping result0.00050.0755440.0000
Template Total0.636891.820.3184
Template load0.00220.320520.0011
Template processing0.634691.493320.3173
Template load and register function0.00010.020610.0001
states
state_id_array0.00190.271610.0019
state_identifier_array0.00120.176320.0006
Override
Cache load0.00170.2381140.0001
Sytem overhead
Fetch class attribute can translate value0.00120.173610.0012
Fetch class attribute name0.00080.113310.0008
XML
Image XML parsing0.00020.025810.0002
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00540.7739100.0005
String conversion0.00000.001340.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs