public class TextToPDF extends Object
Constructor and Description |
---|
TextToPDF() |
Modifier and Type | Method and Description |
---|---|
void |
createPDFFromText(PDDocument doc,
Reader text)
Create a PDF document with some text.
|
PDDocument |
createPDFFromText(Reader text)
Create a PDF document with some text.
|
PDFont |
getFont() |
int |
getFontSize() |
static void |
main(String[] args)
This will create a PDF document with some text in it.
|
void |
setFont(PDFont aFont) |
void |
setFontSize(int aFontSize) |
public PDDocument createPDFFromText(Reader text) throws IOException
text
- The stream of text data.IOException
- If there is an error writing the data.public void createPDFFromText(PDDocument doc, Reader text) throws IOException
text
- The stream of text data.IOException
- If there is an error writing the data.public static void main(String[] args) throws IOException
args
- Command line arguments.IOException
- If there is an error with the PDF.public PDFont getFont()
public void setFont(PDFont aFont)
aFont
- The font to set.public int getFontSize()
public void setFontSize(int aFontSize)
aFontSize
- The fontSize to set.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.