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

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.

eZ debug

Timing: Jan 18 2025 18:37:26
Script start
Timing: Jan 18 2025 18:37:26
Module start 'content'
Timing: Jan 18 2025 18:37:26
Module end 'content'
Timing: Jan 18 2025 18:37:26
Script end

Main resources:

Total runtime0.2966 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.9688180.7969
Module start 'content' 0.00690.0066 768.765689.8984
Module end 'content' 0.01360.2830 858.6641518.9219
Script end 0.2966  1,377.5859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00441.4812200.0002
Check MTime0.00130.4412200.0001
Mysql Total
Database connection0.00080.286210.0008
Mysqli_queries0.237980.18761410.0017
Looping result0.00220.72721390.0000
Template Total0.282795.310.2827
Template load0.00070.228510.0007
Template processing0.282095.078610.2820
Override
Cache load0.00050.153410.0005
Sytem overhead
Fetch class attribute can translate value0.00090.295010.0009
XML
Image XML parsing0.00020.074810.0002
General
dbfile0.00642.1572200.0003
String conversion0.00000.002730.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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