<!-- pandascript.sgml -- the documentation for pandascript.

     This document is part of the pandascript distribution, and is covered
     by the GNU GPL, a copy of which is in the file named COPYING inside the
     distribution.

     This program and it's documentation are distributed in the hope that 
     they will be useful,but WITHOUT ANY WARRANTY; without even the implied 
     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
-->

<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">

<refentry id="pandascript">
<refmeta>
  <refentrytitle>pandascript</refentrytitle>
  <manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
  <refname>pandascript</refname>
  <refpurpose>a scriptable front end to the Panda PDF generation API</refpurpose>
</refnamediv>

<refsynopsisdiv>
  <synopsis>
<command>pandascript</command>
  </synopsis>
</refsynopsisdiv>

<refsect1>
    <title>DESCRIPTION</title>
    <para>
<command>pandascript</command> is an optional scriptable front end to the Panda PDF generation API.
    </para>
</refsect1>

<refsect1>
<title>COMMANDS</title>
<para>
<command>pandascript</command> recognizes these commands when they appear on standard input:
</para>

<variablelist>

<varlistentry>
<term>output</term>
<listitem><para>
Defines the name of the PDF document that you would like to create as the output of <command>pandascript</command>. There is currently no way of specifying standard output as the output location.
</para></listitem>

<variablelist>
<varlistentry>
<term>filename</term>
<listitem><para>
Quoted string. The name of the PDF file to be created.
</para></listitem></varlistentry>
</variablelist>
</varlistentry>

<varlistentry>
<term>close</term>
<listitem><para>
Close the document named in the output command. This includes writing out all of the PDF information that has been created during the session.
</para></listitem></varlistentry>

<varlistentry>
<term>newpage</term>
<listitem><para>
Create a newpage in the PDF document. Only on page may be editted at a time, and there is no way to go backwards in the pages of the PDF, so be sure that you have finished creating the current page before issuing this command.
</para></listitem></varlistentry>

<varlistentry>
<term>imagebox</term>
<listitem><para>
The equivalent of the imagebox(3) function call from the Panda API. The following arguements are required:

<variablelist>
<varlistentry>
<term>top</term>
<listitem><para>
Integer. The location of the top of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>left</term>
<listitem><para>
Integer. The location of the left hand side of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>bottom</term>
<listitem><para>
Integer. The location of the bottom of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>right</term>
<listitem><para>
Integer. The location of the right hand side of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>filename</term>
<listitem><para>
Quoted string. The name of the image file that is being inserted into the PDF file.
</para></listitem></varlistentry>

<varlistentry>
<term>type</term>
<listitem><para>
The type of the image that is being inserted. One of: TIFFIMG or JPEGIMG.
</para></listitem></varlistentry>

</variablelist>
</para></listitem></varlistentry>

<varlistentry>
<term>imageboxrot</term>
<listitem><para>
The equivalent of the imageboxrot(3) function call from the Panda API. This is very similar to the imagebox command above, but allows for the image to be rotated on the page. The following arguements are required:

<variablelist>
<varlistentry>
<term>top</term>
<listitem><para>
Integer. The location of the top of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>left</term>
<listitem><para>
Integer. The location of the left hand side of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>bottom</term>
<listitem><para>
Integer. The location of the bottom of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>right</term>
<listitem><para>
Integer. The location of the right hand side of the image.
</para></listitem></varlistentry>

<varlistentry>
<term>angle</term>
<listitem><para>
Floating point. The angle the image should be rotated at.
</para></listitem></varlistentry>

<varlistentry>
<term>filename</term>
<listitem><para>
Quoted string. The name of the image file that is being inserted into the PDF file.
</para></listitem></varlistentry>

<varlistentry>
<term>type</term>
<listitem><para>
The type of the image that is being inserted. One of: TIFFIMG or JPEGIMG.
</para></listitem></varlistentry>

</variablelist>
</para></listitem></varlistentry>

<varlistentry>
<term>textbox</term>
<listitem><para>
The equivalent of the textbox(3) function call from the Panda API. This inserts a text string onto the current page in the PDF document. The following arguements are required:

<variablelist>
<varlistentry>
<term>top</term>
<listitem><para>
Integer. The location of the top of the textbox.
</para></listitem></varlistentry>

<varlistentry>
<term>left</term>
<listitem><para>
Integer. The location of the left hand side of the textbox.
</para></listitem></varlistentry>

<varlistentry>
<term>bottom</term>
<listitem><para>
Integer. The location of the bottom of the textbox.
</para></listitem></varlistentry>

<varlistentry>
<term>right</term>
<listitem><para>
Integer. The location of the right hand side of the textbox.
</para></listitem></varlistentry>

<varlistentry>
<term>text</term>
<listitem><para>
Quoted string. The text to insert.
</para></listitem></varlistentry>
</variablelist>

<varlistentry>
<term>setfontmode</term>
<listitem><para>
Integer.
</para></listitem></varlistentry>

<varlistentry>
<term>setcharspacing</term>
<listitem><para>
Float.
</para></listitem></varlistentry>

<varlistentry>
<term>setwordspacing</term>
<listitem><para>
Float.
</para></listitem></varlistentry>

<varlistentry>
<term>sethorizscaling</term>
<listitem><para>
Float.
</para></listitem></varlistentry>

<varlistentry>
<term>setleading</term>
<listitem><para>
Float.
</para></listitem></varlistentry>

<varlistentry>
<term>setfont</term>
<listitem><para>
Quoted string.
</para></listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
    <title>DATA TYPES</title>
<para>
The following data types are defined for <command>pandascript</command>:
</para>
    <variablelist>

<varlistentry>
<term>Quoted string</term>
<listitem><para>
This is any text, wrapped in quote characters. For example "frog" "the quick brown duck" and "wasabe is yummy".
</para></listitem></varlistentry>

<varlistentry>
<term>Integer</term>
<listitem><para>
A number without a decimal point. For example 1, 42, or -461.
</para></listitem></varlistentry>

<varlistentry>
<term>Float</term>
<listitem><para>
A number with a decimal point. Examples include: 1.4; 46.56; or -978.6.
</para></listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
    <title>EXAMPLE</title>

<para>
There is sample code generated by demo.sh as part of the <command>pandascript</command> distribution.
</para>

</refsect1>

<refsect1>
    <title>AUTHOR</title>
    <para>
Panda and <command>pandascript</command> are under development by Michael Still (mikal@stillhq.com). All code is Copyright Michael Still 2000,  and is released under the GPL. Code submissions are welcomed. Contact Michael at the address above if you have something you would like to contribute.
</para>
</refsect1>

<refsect1>
    <title>BUGS</title>
    <para>
There  are no known bugs in Panda or <command>pandascript</command>. If you find one, please contact mikal@stillhq.com and let me know.
</para>
</refsect1>

<refsect1>
    <title>VERSION</title>
    <para>
This information was last updated for version 0.3 of <command>pandascript</command>.
    </para>
</refsect1>

</refentry>

