Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## SuccessView.php
- <?php
- public function executeRtf(AgaviRequestDataHolder $rd) {
- $rtf = new FRTF();
- $rtf->Open();
- $rtf->SetPaperSize('A4');
- $rtf->SetPageOrientation('L');
- $rtf->SetViewKind('Page');
- $rtf->SetViewScale(100);
- $rtf->SetViewZk('None');
- $rtf->Write("The first text to be diplayed");
- $rtf->Write("This string will be displayed continously", 'no');
- $rtf->Write('Another string in a new paragraph');
- //$rtf->Output();
- $rtf->Close();
- $rtf_body = $rtf->buffer;
- echo $rtf_body;
- }
- ?>
- ## Expected output
- {\rtf1\ansi\ansicpg{\info{\creatim\yr2011\mo03\dy31\hr16\min03\sec54}}\viewkind1\viewscale100\viewzk0\paperw16839\paperh11907\psz9\landscape\par \pard\plain The first text to be diplayed This string will be displayed continously\par \pard\plain Another string in a new paragraph}
- ## Actual output
- {1{{20110331160915}}11000009 The first text to be diplayed This string will be displayed continously Another string in a new paragraph}
- ## Output Type (output_types.xml)
- <output_type name="rtf">
- <ae:parameter name="http_headers">
- <ae:parameter name="Content-Type">application/rtf</ae:parameter>
- <ae:parameter name="Content-disposition">inline; filename=QualitativeData.rtf</ae:parameter>
- </ae:parameter>
- </output_type>
- ## Routing (routing.xml)
- <route name="rtf" pattern=".rtf$" stop="false" cut="true" output_type="rtf" />
- ## URL generation
- <?php echo $ro->gen('route_name+rtf'); ?>
Add Comment
Please, Sign In to add comment