Add ons for Export to Word or RTF file

You can append
&tmpl=component&format=word
to your list or form URL,
this will create a .doc
but maybe you have to create a custom template to get good results.
I think it's not used very often, just try and report.
 
I never used it.
Testing a bit it seems word can handle only inline styles (nor linked css-files nor <style> tags).

But there was a thread recently mentioning something about a to-word extension or library in the code - I can't find it again.
 
All we do for format=word is render the form normally, but set the content disposition and MIME type thusly:

Code:
JResponse::setHeader('Content-Disposition', "attachment;filename=\"" . $name . ".doc\"");
$this->document->setMimeEncoding('text/html; charset=Windows-1252', false);
... but, as per the comment in the view for the word format:
Code:
 * MS Word/Open office .doc Fabrik Form view class
 * Very rough go at implementing .doc rendering based on the fact that they can read HTML
So it's really just an experiment, and will depend on Word's abilities in handling HTML markup. Which I suspect is very limited, and as Troester says, won't include being able to download CSS files.
There's a couple of potential solutions we've looked at for providing various conversion features, but nothing likely to happen soon.
-- hugh
 
Just to mention : I had to face a similar problem (producing a nice dowloadable word document from fabrik). I used the phpWord lib (http://phpword.readthedocs.org/en/develop/index.html) which is open source and pretty obvious to deal with (a lot of examples). Limited but powerful enough in my case. Of course, it is pretty "rigid" but you can use word template with "kind of" placeholders. I did not use it.
 
One interesting possibility I was giving some thought to the other day was to use this:

http://api.online-convert.com/

I was actually considering it as an element plugin, which would act kind of like a companion element to an upload. So you could point it at an upload element on the form, and specify the format you want that upload converted to.

-- hugh
 
Code:
Code (Text):

JResponse::setHeader('Content-Disposition', "attachment;filename=\"" . $name . ".doc\"");
$this->document->setMimeEncoding('text/html; charset=Windows-1252', false);
Espa?ol: En que pagina se cambia este codigo?
Ingles: That this code page is changed
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top