Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox
Class TextToPDF

    java.lang.Object
      org.pdfbox.TextToPDF

public class TextToPDF
extends Object

This will take a text file and ouput a pdf with that text.

Version:
  $Revision: 1.1 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Constructor Summary
`TextToPDF()`

Method Summary
`PDDocument` | `createPDFFromText(PDDocument doc, Reader text)` Create a PDF document with some text.
`PDSimpleFont` | `getFont()`
`int` | `getFontSize()`
`static void` | `main(String[] args)` This will create a PDF document with a single image on it.
`void` | `setFont(PDSimpleFont aFont)`
`void` | `setFontSize(int aFontSize)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextToPDF

    public TextToPDF()

Method Detail

### createPDFFromText

    public PDDocument createPDFFromText(PDDocument doc,
                                        Reader text)
                                 throws IOException

  Create a PDF document with some text.

  Parameters:
    `doc` - The document to add the text to.
    `text` - The stream of text data.
  Returns:
    The document with the text in it.
  Throws:
    `IOException` - If there is an error writing the data.

### main

    public static void main(String[] args)
                     throws IOException

  This will create a PDF document with a single image on it.
  see usage() for commandline

  Parameters:
    `args` - Command line arguments.
  Throws:
    `IOException` - If there is an error with the PDF.

### getFont

    public PDSimpleFont getFont()

  Returns:
    Returns the font.

### setFont

    public void setFont(PDSimpleFont aFont)

  Parameters:
    `aFont` - The font to set.

### getFontSize

    public int getFontSize()

  Returns:
    Returns the fontSize.

### setFontSize

    public void setFontSize(int aFontSize)

  Parameters:
    `aFontSize` - The fontSize to set.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD