I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-06-20 08:25:41-07 by alexsulov
How I can send OODoc to the user's Web browser.
My program on PHP now make reports into pdf, but it is difficult to edit them. For me is necessary the possibility to make reports into ODT format. Idea is simple. In openoffice make template with the fields of the type name,date,information. Server fills data on sql query and sends the modified template to user. User obtains the ODT file and by necessity make changes in Open Office. Further prints out document on the printer.
#--------------------------------------------- use OpenOffice::OODoc; my $document = ooDocument(file => "MyFile.odt"); $document->selectElementByContent("name","qwerty"); print "Content-type:application/vnd.oasis.opendocument.text/odt\n"; print "Content-disposition: inline; name=myTEST.odt\n\n"; #??????????????? $document->save("/dev/stdout"); #???????????? #
How I can send $document to the user's Web browser.
Direct Responses: 2516 | Write a response
Posted on 2006-06-20 21:54:21-07 by bob in response to 2514
Re: How I can send OODoc to the user's Web browser.
This works in my cgi script:
================================================== my $file="/tmp/a_document.$$.sxw"; my $content = ooDocument(file=> $file,create => 'text',readable_XML=>'on' ); # Add stuff # $content->save(); print "Content-type: application/vnd.oasis.opendocument.text\n\n"; print `cat $file`; ==================================================
If you are working on a windows system, you may need to set up a file type.
Direct Responses: Write a response