Text::Textile::PostScript - Generate PostScript output from Textile mark-up


    use Text::Textile::PostScript qw(textile);

    my $textile = <<EOT;
    h1. Heading

    A _simple_ demonstration of Textile markup.

    * One
    * Two
    * Three

    "More information": is available.

    # Procedural interface:
    my $postscript = textile($textile);
    print $postscript;

    # Object-oriented interface
    my $ttps = Text::Textile::RTF->new();
    $postscript = $ttps->process($textile);


Text::Textile::PostScript is a sub-class of Text::Textile::Plaintext that produces PostScript output instead of plain text. See Text::Textile::Plaintext for more detail.


This class only defines the following two methods. It inherits everything else from Text::Textile::Plaintext.


Create a new instance of this class. This constructor calls the super-class constructor after handling the formatter parameter and setting up an instance of HTML::FormatRTF to pass to the parent. This method only handles the following parameter:


Specify either a pre-created instance of HTML::FormatPS (or a suitable sub-class) or a hash-reference of parameters to pass to the constructor when creating one. If this parameter is not present, an object is created with the default parameters (as according to HTML::FormatPS). The exception to this is that the default paper-size in HTML::FormatPS is "A4", whereas this module defaults paper size to "Letter". See HTML::FormatPS for details on the options available to the constructor.

See documentation of the new() method in Text::Textile::Plaintext for additional recognized parameters.


This method is defined in this class so that it can be imported and used procedurally, as textile() is used in either Text::Textile::Plaintext or Text::Textile itself. It renders the Textile mark-up in $textile to HTML, then renders the resulting HTML tree into PostScript. It returns the PostScript content as a single string.


Please report any bugs or feature requests to bug-text-textile-plaintext at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.



This file and the code within are copyright (c) 2009 by Randy J. Ray.

Copying and distribution are permitted under the terms of the Artistic License 2.0 ( or the GNU LGPL 2.1 (


Text::Textile, Text::Textile::Plaintext, Text::Textile::RTF, HTML::FormatPS.


Randy J. Ray <>