|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.core.io.AbstractPdfProclet
adams.core.io.ImagePdfProclet
public class ImagePdfProclet
Adds GIF, JPEG and PNG image files.
Valid options are:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-page-break-before (property: pageBreakBefore) If true, then a page-break is added before the content of the file is inserted.
-page-break-after (property: pageBreakAfter) If true, then a page-break is added after the content of the file is inserted.
-num-files <int> (property: numFilesPerPage) The number of files to put on a page before adding an automatic page break; use -1 for unlimited. default: -1 minimum: -1
-add-filename (property: addFilename) Whether to add the file name before the actual file content as separate paragraph.
-font-filename <adams.core.io.PdfFont> (property: fontFilename) The font to use for printing the file name header. default: Helvetica-Bold-12
-color-filename <java.awt.Color> (property: colorFilename) The color to use for printing the file name header. default: #000000
-rotation <int> (property: rotation) The rotation in degrees. default: 0 minimum: 0 maximum: 360
-scale <double> (property: scale) The scaling factor for the image, ie, scaling it to the page dimensions; use 0 to turn scaling off. default: 1.0 minimum: 0.0 maximum: 1.0
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class adams.core.io.AbstractPdfProclet |
|---|
AbstractPdfProclet.DocumentState |
| Field Summary | |
|---|---|
protected int |
m_Rotation
the degrees to rotate images. |
protected double |
m_Scale
the percentage (0-1) to scale the images to. |
| Fields inherited from class adams.core.io.AbstractPdfProclet |
|---|
m_AddFilename, m_ColorFilename, m_FontFilename, m_NumFilesPerPage, m_PageBreakAfter, m_PageBreakBefore, MATCH_ALL_EXTENSION |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
ImagePdfProclet()
|
|
| Method Summary | |
|---|---|
void |
defineOptions()
Adds options to the internal list of options. |
protected boolean |
doProcess(com.itextpdf.text.Document doc,
AbstractPdfProclet.DocumentState state,
File file)
The actual processing of the document. |
BaseString[] |
getExtensions()
Returns the extensions that the processor can process. |
int |
getRotation()
Returns the degrees by which to rotate the images. |
double |
getScale()
Returns the scale factor (0-1) for images based on the page size. |
String |
globalInfo()
Returns a short description of the writer. |
String |
rotationTipText()
Returns the tip text for this property. |
String |
scaleTipText()
Returns the tip text for this property. |
void |
setRotation(int value)
Sets the degrees to rotate the image by. |
void |
setScale(double value)
Sets the scale factor (0-1) for images based on the page size. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int m_Rotation
protected double m_Scale
| Constructor Detail |
|---|
public ImagePdfProclet()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractPdfProcletpublic void setRotation(int value)
value - the degreespublic int getRotation()
public String rotationTipText()
public void setScale(double value)
value - the scale factor, 0 to turn off scalingpublic double getScale()
public String scaleTipText()
public BaseString[] getExtensions()
getExtensions in class AbstractPdfProclet
protected boolean doProcess(com.itextpdf.text.Document doc,
AbstractPdfProclet.DocumentState state,
File file)
throws Exception
doProcess in class AbstractPdfProcletdoc - the PDF document to add the file content tostate - the current document statefile - the file to add
Exception - if something goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||