|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.plugin.pdf.PdfOutfile
public class PdfOutfile
Manage output to the PDF file
Nested Class Summary | |
---|---|
(package private) class |
PdfOutfile.OnPageEnd
|
Field Summary | |
---|---|
(package private) BulletLists |
bulletLists
the collection of active bullet lists |
(package private) com.lowagie.text.pdf.ColumnText |
iTColumn
the column that the text is written to in iText. |
(package private) com.lowagie.text.Document |
iTDocument
fields with the iT prefix are from iText. |
(package private) com.lowagie.text.Paragraph |
iTPara
the largest entity written to an iTDocument is a paragraph |
(package private) int |
iTStatus
iText variable that ColumnText uses to see if there's more to write out |
(package private) com.lowagie.text.pdf.PdfWriter |
iTWriter
the writer that writes to the iTDocument. |
private boolean |
openStatus
|
(package private) PdfData |
pdfData
the PDF data structure |
(package private) java.lang.String |
pdfFilename
the name of the output file |
Constructor Summary | |
---|---|
PdfOutfile()
|
Method Summary | |
---|---|
void |
addColumnsContentToDocument()
The method that renders the PDF file |
void |
addParagraph(com.lowagie.text.Paragraph para,
com.lowagie.text.pdf.ColumnText column)
If paragraph has content, add it to the content of the current column |
void |
addParagraphToList(com.lowagie.text.Paragraph para)
Adds a paragraph to the currently active bullet list. |
void |
addUrl(java.lang.String url,
java.lang.String text)
Emits a URL with the specified cover text. |
void |
close()
Outputs any material that has not yet been output. |
(package private) float |
computeBottomColEdge(float topEdge)
Compute the bottom edge, which is the lesser of the topEdge - columnHeight or top edge - bottom margin. |
(package private) float |
computeLeftColEdge()
Computes the left edge of the current column It starts with the left margin and adds the width and gutters of any columns between it and the left margin. |
(package private) float |
computeRightColEdge(float leftEdge)
Compute the right edge of the current column. |
(package private) float |
computeTopColEdge()
Compute the top edge of the curren column, which is the page height (PDF coordinates start at lower left corner) - top margin - vertical skip. |
(package private) float |
doFirstLineIndent(com.lowagie.text.Paragraph para,
PdfData pData)
Handles indenting the first line of a paragraph. |
(package private) void |
doParagraphAlignment(com.lowagie.text.Paragraph para,
PdfData pData)
Implement the paragraph alignment |
(package private) float |
doParagraphIndent(com.lowagie.text.Paragraph para,
PdfData pData)
Handles indenting the entire paragraph. |
(package private) float |
doParagraphIndentRight(com.lowagie.text.Paragraph para,
PdfData pData)
Handles indenting the entire paragraph. |
(package private) void |
doParagraphSpaceBefore(com.lowagie.text.Paragraph para,
PdfData pData)
Implement the line spacing before the paragraph, if any. |
void |
emitChar(java.lang.String ch,
java.lang.String fontName)
Emit a single character in the current font, size, etc. |
void |
emitText(java.lang.String s)
Writes text to the PDF file. |
void |
endPlainBulletList()
End the currently active bullet list. |
int |
getAddStatus()
|
float |
getColumnWidth()
|
com.lowagie.text.pdf.ColumnText |
getItColumn()
|
com.lowagie.text.Paragraph |
getItPara()
|
float |
getYposition()
Gets the Y-position from iTColumn |
boolean |
inABulletList()
Are we in a bullet list? |
boolean |
isOpen()
|
(package private) void |
makeSureOutfileIsOpen()
Make sure file is open in the event that the first item is not text, such as if it is a URL. |
void |
newPage()
High level skip to the top of the next page. |
boolean |
newPageLowLevel()
Forces a new page without any of the accompanying processing (although pageEnd() and newPage() events in iText are still performed). |
void |
open(java.lang.String filename,
PdfData pdd)
Open the output file. |
(package private) void |
openPdfFile(GDD gdd,
PdfData pdf,
java.lang.String filename)
Low level function for opening an iText file (that is, an iText Document) |
void |
setBulletLists(BulletLists newBulletLists)
|
(package private) void |
setColumnSize()
Set the size of the columns based on their number, page size, and gutter size. |
void |
setItColumn(com.lowagie.text.pdf.ColumnText ct)
|
void |
setItPara(com.lowagie.text.Paragraph newPara)
|
void |
setMarginsMirrored()
Turn on margin mirroring. |
void |
setPdfData(PdfData newPdfData)
|
void |
startNewParagraph()
Starts a new iText Paragraph. |
void |
startPlainBulletList(com.lowagie.text.Chunk bulletSymbol)
Adds a new bullet list to the stack of bulleted lists. |
void |
startPlainBulletList(java.lang.String bulletSymbol)
Converts bullet string into an iText Chunk and calls the method that adds a list using the Chunk to define the bullet symbol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean openStatus
com.lowagie.text.Document iTDocument
com.lowagie.text.pdf.PdfWriter iTWriter
com.lowagie.text.pdf.ColumnText iTColumn
com.lowagie.text.Paragraph iTPara
BulletLists bulletLists
int iTStatus
java.lang.String pdfFilename
PdfData pdfData
Constructor Detail |
---|
public PdfOutfile()
Method Detail |
---|
public void open(java.lang.String filename, PdfData pdd) throws java.io.IOException
filename
- name of file to openpdd
- the PDF data class
java.io.IOException
- in event of a problem opening the file
java.lang.IllegalArgumentException
- if pdd is nullvoid openPdfFile(GDD gdd, PdfData pdf, java.lang.String filename) throws java.io.IOException
gdd
- the GDDpdf
- the PDF datafilename
- name of file to be opened
java.io.IOException
- in the event opening the file runs into an errorpublic void close() throws FileCloseException
FileCloseException
- if an error occurs closing the filepublic void addParagraph(com.lowagie.text.Paragraph para, com.lowagie.text.pdf.ColumnText column)
para
- the iText paragraph to addcolumn
- the iText column to add the paragraph topublic void startPlainBulletList(java.lang.String bulletSymbol)
bulletSymbol
- string to use as a bullet symbol (most often, a single character)public void startPlainBulletList(com.lowagie.text.Chunk bulletSymbol)
bulletSymbol
- symbol to be used as the bullet marker (an iText Chunk)public void addParagraphToList(com.lowagie.text.Paragraph para)
para
- the paragraph to addpublic void endPlainBulletList()
public boolean inABulletList()
float doFirstLineIndent(com.lowagie.text.Paragraph para, PdfData pData)
para
- the paragraph with the indented first linepData
- the PDF data class containing the indent amount (in points)
float doParagraphIndent(com.lowagie.text.Paragraph para, PdfData pData)
para
- paragraphpData
- PDF data containing the amount of indent (in points)
float doParagraphIndentRight(com.lowagie.text.Paragraph para, PdfData pData)
para
- paragraphpData
- PDF data containing the amount of indent (in points)
void doParagraphSpaceBefore(com.lowagie.text.Paragraph para, PdfData pData)
para
- the paragraph to alignpData
- the PdfData container holding the current settings of the PDF outputvoid doParagraphAlignment(com.lowagie.text.Paragraph para, PdfData pData)
para
- the paragraph to alignpData
- the PdfData container holding the current settings of the PDF outputpublic void addColumnsContentToDocument()
void setColumnSize()
float computeBottomColEdge(float topEdge)
topEdge
- top edge of this column
float computeLeftColEdge()
float computeRightColEdge(float leftEdge)
leftEdge
- location of left edge
float computeTopColEdge()
public void newPage()
public boolean newPageLowLevel()
public void startNewParagraph()
void makeSureOutfileIsOpen() throws java.io.IOException
java.io.IOException
- in the event that the call to open() throws this exceptionpublic void emitText(java.lang.String s)
s
- the text to be writtenpublic void emitChar(java.lang.String ch, java.lang.String fontName)
ch
- char to be emittedfontName
- fontName to use. If null, use current font.public void addUrl(java.lang.String url, java.lang.String text)
url
- the URL of the linktext
- words to be printed and made linkable (in lieu of printing the URL)public void setMarginsMirrored()
public float getYposition()
public int getAddStatus()
public boolean isOpen()
public void setPdfData(PdfData newPdfData)
public float getColumnWidth()
public com.lowagie.text.Paragraph getItPara()
public void setBulletLists(BulletLists newBulletLists)
public void setItPara(com.lowagie.text.Paragraph newPara)
public void setItColumn(com.lowagie.text.pdf.ColumnText ct)
public com.lowagie.text.pdf.ColumnText getItColumn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |