public class BulletText extends java.lang.Object implements PDFPageBandSection
Constructor and Description |
---|
BulletText(java.lang.String text,
int level)
Creates a bullet text with normal layout (not compact)
|
BulletText(java.lang.String text,
int level,
boolean compactprint)
Create a bullet text with specified layout
|
Modifier and Type | Method and Description |
---|---|
boolean |
breakableSection()
This method specifies if the section can be broken (and so printed across
several pages.
|
java.lang.String |
dropContentSample()
this class drops a content sample for logging purposes.
|
float |
getSectionHeight(float leftinmm,
float rightinmm)
the height of section that needs to be printed
|
void |
initialize()
This method allows sections to initialize themselves knowning the full
reference of the document before the page number is calculated
|
void |
print(PDFPageBand pageband,
PDFPage currentpage,
float mmfromtopforsection,
float leftinmm,
float rightinmm) |
PDFPageBand.PartialPrintFeedback |
printPartial(PDFPageBand pageband,
float spaceleft,
PDFPage currentpage,
float mmfromtopforsection,
float leftinmm,
float rightinmm) |
void |
setParentDocument(PDFDocument document)
Provides automatically the PDFDocument to the PDFPageBandSection.
|
public BulletText(java.lang.String text, int level, boolean compactprint)
text
- Text to display. The text should not have big carriage
return (\n), but can have small carriage return (\r)level
- an integer from 1 to 3 for the level of bulletcompactprint
- if true, compact display, if false, use normal paragraph
spacing around bulletspublic BulletText(java.lang.String text, int level)
text
- Text to display. The text should not have big carriage return
(\n), but can have small carriage return (\r)level
- an integer from 1 to 3 for the level of bulletpublic void print(PDFPageBand pageband, PDFPage currentpage, float mmfromtopforsection, float leftinmm, float rightinmm) throws java.io.IOException
print
in interface PDFPageBandSection
pageband
- pageband calling the method. That allows for
recursive callingcurrentpage
- the page to print intommfromtopforsection
- the cursor location to start printing atleftinmm
- the index of the left most printable space of the
printing sectionrightinmm
- the index of the right most printable space of the
printing sectionjava.io.IOException
public float getSectionHeight(float leftinmm, float rightinmm) throws java.io.IOException
PDFPageBandSection
getSectionHeight
in interface PDFPageBandSection
leftinmm
- the index of the left most printable space of the printing
sectionrightinmm
- the index of the right most printable space of the printing
sectionjava.io.IOException
public boolean breakableSection()
PDFPageBandSection
breakableSection
in interface PDFPageBandSection
public PDFPageBand.PartialPrintFeedback printPartial(PDFPageBand pageband, float spaceleft, PDFPage currentpage, float mmfromtopforsection, float leftinmm, float rightinmm) throws java.io.IOException
printPartial
in interface PDFPageBandSection
pageband
- pageband calling the method. That allows for
recursive callingspaceleft
- the space (height) in mmcurrentpage
- the page to print intommfromtopforsection
- the cursor location to start printing atleftinmm
- the index of the left most printable space of the
printing sectionrightinmm
- the index of the right most printable space of the
printing sectionjava.io.IOException
public java.lang.String dropContentSample()
PDFPageBandSection
dropContentSample
in interface PDFPageBandSection
public void setParentDocument(PDFDocument document)
PDFPageBandSection
setParentDocument
in interface PDFPageBandSection
document
- the parent document to the PDFPageBand.public void initialize()
PDFPageBandSection
initialize
in interface PDFPageBandSection