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.