Services · Blog · Demo
Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...

RtfContrib

Extension to translate TWiki markup to RTF

Usage

The current use is restricted to exporting TWiki data from a topic and insert it into a RTF template file. This template file contains tags like %FORMFIELD{"FirstName"}% and %TEXT% which are replaced with the data extracted from the current topic. When you call the rtf CGI script on a topic like this
http://your.domain.com/cgi-bin/twiki/rtf/Main/TestUser?template=Main.UserForm.user-form.rtf&filename=Hello.rtf
the script will use the RTF template user-form.rtf attached to the topic Main.UserForm and process it as outlined. The result is then cached in a configurable CacheDir under the name Hello.rtf in addition to sending it to the browser. Your browser can be configured to open up the received file with an appropriate word processing tool.

Template tags

The following tags are replaced with data drawn from a TWiki topic
Name Description
%TEXT% topic text
%SECTION{"name"}% named topic section
%FORMFIELD{"name"}% formfield of an attched TWikiForm
%ATTACHMENT{"name" format="..."}% information about attached files
%IMAGE{"url"}% inserts an image downloaded from the given url; supported image formats are jpeg, png, ...

Customizing RTF output

The basic layout of the RTF output is specified by an RTF file that serves as a template. So you have the freedom to create such a document as you like. This extension comes with a few predefined templates that might help you to adjust them to you own needs.

In addition there are some preference variables that determine the formatting of output generate while translating TWiki markup to RTF.

  • headings: ...
  • lists: ...
  • ...

Configuration

  • $TWiki::cfg{RtfContrib}{Debug}: debugging flag, defaults to 0
  • $TWiki::cfg{RtfContrib}{CacheDir}: directory where generated RTF files are cached, defaults to /pub/TWiki/RtfContrib
  • $TWiki::cfg{RtfContrib}{DefaultRtfTemplate}: RTF file used as a template to create the final RTF file from it when exporting a topic, this can be overriden using the template urlparam on the rtf CGI call

Installation Instructions

%$INSTALL_INSTRUCTIONS%

Plugin Info

Plugin Author(s): TWiki:Main/MichaelDaum
Plugin Version: v0.50
Copyright: © 2007-2008 Michael Daum http://michaeldaumconsulting.com
License: GPL (Gnu General Public License)
Change History:  
Dependencies: %$DEPENDENCIES%
Plugin Home: TWiki:Plugins/RtfContrib
Feedback: TWiki:Plugins/RtfContribDev
Appraisal: TWiki:Plugins/RtfContribAppraisal

  Attachment Action Size Date Who Comment
doc EmployeePortalViewTemplate-DE.rtf props, move 253.9 K 25 Oct 2007 - 13:21 UnknownUser  
doc EmployeePortalViewTemplate-EN.rtf props, move 253.9 K 25 Oct 2007 - 13:23 UnknownUser  
doc NatSkinEmployeePortalViewTemplate-EN.rtf props, move 253.9 K 06 Aug 2007 - 14:12 UnknownUser  
doc RenderEmployeePortal-DE.rtf props, move 272.4 K 25 Oct 2007 - 13:26 UnknownUser  
doc RenderEmployeePortal-EN.rtf props, move 272.4 K 25 Oct 2007 - 13:29 UnknownUser  
doc RenderTvdCurriculumVitae-DE.rtf props, move 310.2 K 19 Oct 2007 - 09:28 UnknownUser  
doc RenderTvdCurriculumVitae-EN.rtf props, move 334.4 K 02 Dec 2007 - 05:58 UnknownUser  
doc TestTriPage-DE.rtf props, move 292.8 K 19 Oct 2007 - 07:37 UnknownUser  
doc TestTriPage-EN.rtf props, move 292.1 K 19 Oct 2007 - 08:06 UnknownUser  
doc TriPageTemplate-DE.rtf props, move 257.2 K 30 Nov 2007 - 08:34 UnknownUser  
doc TriPageTemplate-EN.rtf props, move 257.2 K 04 Dec 2007 - 06:36 UnknownUser  
doc default-template.rtf props, move 0.8 K 11 May 2007 - 15:46 UnknownUser  
r1 - 26 Mar 2008 - 21:02:31 - TWikiGuest
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiRing? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.RtfContrib
Syndicate this site RSSATOM