public class MetafileHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
MetafileHelper.ContextContainer
Simple container that stores and returns a context-local instance of
the global work area.
|
private static class |
MetafileHelper.WorkArea
Stores global data relating to the state of the current context.
|
| Modifier and Type | Field and Description |
|---|---|
private static boolean |
openFile
Flag to open real file or make preview.
|
private static double |
pixPerCol
Column modifier to convert XPR helper character coords to pixel.
|
private static double |
pixPerRow
Row modifier to convert XPR helper row coords to pixel.
|
private static int |
units
Base units type, inches, cm or mm.
|
private static int |
UNITS_CM
Base units is cm constant.
|
private static int |
UNITS_INCHES
Base units is inches constant.
|
private static int |
UNITS_MM
Base units is mm constant.
|
private static MetafileHelper.ContextContainer |
work
Stores context-local state variables.
|
| Constructor and Description |
|---|
MetafileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bootstrap()
Method called at server bootstrap that initializes values from the directory
configuration.
|
static void |
drawFilledRect(decimal left,
decimal top,
decimal right,
decimal bottom)
Draws the rectangle between left-top point and right-bottom with current line and fill
attributes.
|
static void |
drawFilledRect(double left,
double top,
double right,
double bottom)
Draws the rectangle between left-top point and right-bottom with current line and fill
attributes.
|
static void |
drawImage(character option,
decimal x,
decimal y,
decimal width,
decimal height,
character filename,
decimal imgWidth,
decimal imgHeight)
Draws the image.
|
static void |
drawImage(java.lang.String option,
decimal x,
decimal y,
decimal width,
decimal height,
character filename,
decimal imgWidth,
decimal imgHeight)
Draws the image.
|
static void |
drawImage(java.lang.String option,
decimal x,
decimal y,
double width,
double height,
character filename,
decimal imgWidth,
decimal imgHeight)
Draws the image.
|
static void |
drawImage(java.lang.String option,
double x,
double y,
double width,
double height,
java.lang.String filename,
decimal imgWidth,
decimal imgHeight)
Draws the image.
|
static void |
drawImagePart(decimal x,
decimal y,
integer widthPix,
integer heightPix,
decimal maxWidthCm,
character filename)
Draws the part of the image.
|
static void |
drawImagePart(double x,
double y,
int widthPix,
int heightPix,
double maxWidthCm,
java.lang.String filename)
Draws the part of the image.
|
static void |
drawLine(decimal left,
decimal top,
decimal right,
decimal bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawLine(decimal left,
decimal top,
double right,
decimal bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawLine(decimal left,
double top,
decimal right,
double bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawLine(decimal left,
double top,
double right,
double bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawLine(double left,
decimal top,
decimal right,
decimal bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawLine(double left,
decimal top,
double right,
decimal bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawLine(double left,
double top,
double right,
double bottom)
Draws the line from left-top point to right-bottom with current line attributes.
|
static void |
drawRect(decimal left,
decimal top,
decimal right,
decimal bottom)
Draws the framed rectangle between left-top point and right-bottom with current line
attributes.
|
static void |
drawRect(double left,
decimal top,
decimal right,
decimal bottom)
Draws the framed rectangle between left-top point and right-bottom with current line
attributes.
|
static void |
drawRect(double left,
double top,
double right,
double bottom)
Draws the framed rectangle between left-top point and right-bottom with current line
attributes.
|
static void |
drawText(character text)
Draws the text at current position.
|
static void |
drawText(java.lang.String text)
Draws the text at current position.
|
static void |
drawTextAndSetX(decimal x,
character text)
Draws the text at current position.
|
static void |
drawTextAndSetX(double x,
java.lang.String text)
Draws the text at current position.
|
static void |
drawTextAtX(double x,
java.lang.String text,
java.lang.String align)
Draws the text at the given X position and current Y position and given alignment.
|
static void |
drawTextAtXLeft(decimal x,
character text)
Draws the text at the given X position and current Y position and left alignment.
|
static void |
drawTextAtXLeft(double x,
java.lang.String text)
Draws the text at the given X position and current Y position and left alignment.
|
static void |
drawTextAtXRight(decimal x,
character text)
Draws the text at the given X position and current Y position and left alignment.
|
static void |
drawTextAtXRight(double x,
java.lang.String text)
Draws the text at the given X position and current Y position and left alignment.
|
static void |
drawTextBetween(decimal left,
decimal right,
character text,
java.lang.String align)
Draws the text between left and right X positions and current Y position with given
alignment.
|
static void |
drawTextBetween(double left,
double right,
java.lang.String text,
java.lang.String align)
Draws the text between left and right X positions and current Y position with given
alignment.
|
static void |
drawTextBetweenLeft(decimal left,
decimal right,
character text)
Draws the text between left and right X positions and current Y position with left
alignment.
|
static void |
drawTextBetweenLeft(double left,
double right,
java.lang.String text)
Draws the text between left and right X positions and current Y position with left
alignment.
|
static void |
drawTextBetweenRight(decimal left,
decimal right,
character text)
Draws the text between left and right X positions and current Y position with right
alignment.
|
static void |
drawTextBetweenRight(double left,
double right,
java.lang.String text)
Draws the text between left and right X positions and current Y position with right
alignment.
|
static void |
getFont(character fontName)
Gets the current font value.
|
static void |
getFontHeight(decimal fontHeight)
Gets the current font height value.
|
static void |
getFreeSpaceDown(decimal freeSpaceDown)
Gets the free space below the current Y position.
|
static void |
getFreeSpaceRight(decimal freeSpaceRight)
Gets the free space to the right the current X position.
|
static void |
getPageHeight(decimal pageHeight)
Gets the current page height.
|
static void |
getPageNumber(integer pageNum)
Gets the current page number.
|
static void |
getPageWidth(decimal pageWidth)
Gets the current page width.
|
static double |
getTextWeightScale(java.lang.String textToTest,
java.lang.String fontName,
boolean isBold,
boolean isItalic)
Calculates the scaling factor for given text.
|
static void |
getTextWidth(character textToMeasure,
decimal textWidth)
Gets the given text width value.
|
static void |
getTextWidth(java.lang.String textToMeasure,
decimal textWidth)
Gets the given text width value.
|
static java.lang.String |
getTmpDirectory()
Gets optionally set temporary directory to store generated PDF temporary files.
|
static void |
getXY(decimal x,
decimal y)
Gets the new current position for cursor.
|
static void |
getZoomFactor(character zoomType)
Gets the current zoom factor value.
|
static void |
initialize(decimal footerTextHeight,
character tmpDir,
integer ok)
General metafile subsystem init procedure.
|
static void |
initialize(double footerTextHeight,
java.lang.String tmpDir,
integer ok)
General metafile subsystem init procedure.
|
static void |
interruptRecording()
Interrupts all operation for the current metafile.
|
static boolean |
isParameterValid(BaseDataType op)
Checks if the given parameter is valid and can be used in Metafile api.
|
static boolean |
isUnderline()
Gets flag meaning underlined text should be currently used.
|
static void |
makePdf(character pdfFileName)
Makes PDF file from the currently recorded metafile.
|
static void |
makePdf(character pdfFileName,
boolean openFilePDF)
Makes PDF file from the currently recorded metafile with preview mode or not.
|
static void |
makePdf(character pdfFileName,
logical openFilePDF)
Makes PDF file from the currently recorded metafile with preview mode or not.
|
static void |
makePdf(java.lang.String pdfFileName)
Makes PDF file from the currently recorded metafile.
|
static void |
makePdf(java.lang.String pdfFileName,
boolean openFilePDF)
Makes PDF file from the currently recorded metafile with preview mode or not.
|
static void |
makePdf(java.lang.String pdfFileName,
logical openFilePDF)
Makes PDF file from the currently recorded metafile with preview mode or not.
|
static int |
mfUnits2pix(double mfValue)
Converts metafile coordinate value into pixel based coordinate.
|
static double |
pix2MfUnits(float pixelValue)
Converts pixel coordinate value into metafile device independent unit value.
|
static void |
pix2MfUnits(int pixelValue,
decimal mfUnits)
Converts pixel coordinate value into metafile device independent unit value.
|
static void |
pix2MfUnits(integer pixelValue,
decimal mfUnits)
Converts pixel coordinate value into metafile device independent unit value.
|
static void |
resetPage(java.lang.String mode,
int newMaxPageNum)
Sets new value for current/maximum page number.
|
static void |
resetPage(java.lang.String mode,
integer newMaxPageNum)
Sets new value for current/maximum page number.
|
static void |
resetTextStyle()
Resets new value for text style to be off.
|
private static Metafile |
resolveCurrentMetafile()
Gets the instance of the current metafile to process.
|
static void |
setFillColor(int rgbColor)
Sets new current color value to be used in fill based primitives.
|
static void |
setFillColor(integer rgbColor)
Sets new current color value to be used in fill based primitives.
|
static void |
setFont(character fontName)
Sets new value for current font.
|
static void |
setFont(java.lang.String fontName)
Sets new value for current font.
|
static void |
setFontHeight(float fontHeight)
Sets the current font height value.
|
static void |
setFontHeight(integer fontHeight)
Sets the current font height value.
|
static void |
setImageAlign(java.lang.String horizAlign,
java.lang.String vertAlign)
Sets new values for image alignment.
|
static void |
setInterleaving(decimal extraYSpace)
Sets the extra vertical space between two sequential rows.
|
static void |
setInterleaving(double extraYSpace)
Sets the extra vertical space between two sequential rows.
|
static void |
setLeftMargin(decimal leftMargin)
Sets the new value for document's left margin.
|
static void |
setLeftMargin(double leftMargin)
Sets the new value for document's left margin.
|
static void |
setLineAttributes(character style,
decimal thickness,
integer redColor,
integer greenColor,
integer blueColor)
Sets new values for line attributes.
|
static void |
setLineAttributes(java.lang.String style,
decimal thickness,
int redColor,
int greenColor,
int blueColor)
Sets new values for line attributes.
|
static void |
setLineAttributes(java.lang.String style,
double thickness,
int redColor,
int greenColor,
int blueColor)
Sets new values for line attributes.
|
static void |
setLineColor(int rgbColor)
Sets new current color value to be used in line based primitives.
|
static void |
setLineColor(integer rgbColor)
Sets new current color value to be used in line based primitives.
|
static void |
setLineStyle(character style,
decimal thickness)
Sets new values for line attributes.
|
static void |
setLineStyle(java.lang.String style,
decimal thickness)
Sets new values for line attributes.
|
static void |
setLineStyle(java.lang.String style,
double thickness)
Sets new values for line attributes.
|
static void |
setPageNumber(int newPageNum)
Sets new value for current page number.
|
static void |
setPageNumberPosition(decimal x,
decimal y)
Sets the new current position for page number.
|
static void |
setPageNumberPosition(double x,
double y)
Sets the new current position for page number.
|
static void |
setPageNumberText(character text,
int pgNumberNdx)
Sets new value for current page number text.
|
static void |
setPageNumberText(decimal x,
decimal y,
character text)
Sets new value for current page number text(alternative version).
|
static void |
setPageNumberText(double x,
double y,
java.lang.String text)
Sets new value for current page number text(alternative version).
|
static void |
setPageNumberText(java.lang.String text,
int pgNumberNdx)
Sets new value for current page number text.
|
static void |
setPageOrientation(character mode)
Sets new value for current page orientation.
|
static void |
setPageOrientation(java.lang.String mode)
Sets new value for current page orientation.
|
static void |
setTextAlignment(character horizAlign,
character vertAlign)
Sets new values for text alignment.
|
static void |
setTextAlignment(character horizAlign,
java.lang.String vertAlign)
Sets new values for text alignment.
|
static void |
setTextAlignment(java.lang.String horizAlign,
character vertAlign)
Sets new values for text alignment.
|
static void |
setTextAlignment(java.lang.String horizAlign,
java.lang.String vertAlign)
Sets new values for text alignment.
|
static void |
setTextColor(int rgbColor)
Sets new current color value to be used in text primitives.
|
static void |
setTextColor(integer rgbColor)
Sets new current color value to be used in text primitives.
|
static void |
setTextStyle(character style)
Sets new value for text style.
|
static void |
setTextStyle(java.lang.String style)
Sets new value for text style.
|
static void |
setXY(decimal x,
decimal y)
Sets the new current position for cursor.
|
static void |
setXY(decimal x,
double y)
Sets the new current position for cursor.
|
static void |
setXY(double x,
decimal y)
Sets the new current position for cursor.
|
static void |
setXY(double x,
double y)
Sets the new current position for cursor.
|
static void |
setZoomFactor(character zoomType)
Sets new value for current zoom factor.
|
static void |
setZoomFactor(java.lang.String zoomType)
Sets new value for current zoom factor.
|
static void |
showPageFooter(int show)
Sets to show page footer or not.
|
static void |
showPageFooter(integer show)
Sets to show page footer or not.
|
static void |
startNewPage()
Starts the new page construction for the document that is currently processing.
|
static void |
startNewTextLine()
Starts new line of the text.
|
static void |
stopRecording()
Stops all operation for the current metafile.
|
static double |
x2Col(double x)
Converts X cm metafile coordinate to XPR column value.
|
static double |
y2Row(double y)
Converts Y cm metafile coordinate to XPR row value.
|
private static final int UNITS_INCHES
private static final int UNITS_CM
private static final int UNITS_MM
private static double pixPerRow
private static double pixPerCol
private static int units
private static MetafileHelper.ContextContainer work
private static boolean openFile
public static void bootstrap()
public static void setTextAlignment(java.lang.String horizAlign,
java.lang.String vertAlign)
horizAlign - The new String value for horizontal text alignment. The valid alignment values:
"left", "center", "right".vertAlign - The new String value for vertical text alignment. The valid alignment values:
"top", "baseline", "bottom".public static void setTextAlignment(character horizAlign, java.lang.String vertAlign)
horizAlign - The new String value for horizontal text alignment. The valid alignment values:
"left", "center", "right".vertAlign - The new String value for vertical text alignment. The valid alignment values:
"top", "baseline", "bottom".public static void setTextAlignment(java.lang.String horizAlign,
character vertAlign)
horizAlign - The new String value for horizontal text alignment. The valid alignment values:
"left", "center", "right".vertAlign - The new String value for vertical text alignment. The valid alignment values:
"top", "baseline", "bottom".public static void setTextAlignment(character horizAlign, character vertAlign)
horizAlign - The new String value for horizontal text alignment. The valid alignment values:
"left", "center", "right".vertAlign - The new String value for vertical text alignment. The valid alignment values:
"top", "baseline", "bottom".public static void setTextColor(int rgbColor)
rgbColor - The new 32-bit color value packed in int value.public static void setTextColor(integer rgbColor)
rgbColor - The new 32-bit color value packed in int value.public static void setTextStyle(java.lang.String style)
style - The new String value for the current text style. The valid style values:
"italic", "underline", "bold", "no-italic", "no-underline", "no-bold".public static void setTextStyle(character style)
style - The new String value for the current text style. The valid style values:
"italic", "underline", "bold", "no-italic", "no-underline", "no-bold".public static boolean isUnderline()
TRUE if text underlined, FALSE otherwise.public static void resetTextStyle()
public static void startNewPage()
public static void setFont(java.lang.String fontName)
fontName - The new String value for the current font name. Can be "default" for default
font to use.public static void setFont(character fontName)
fontName - The new String value for the current font name. Can be "default" for default
font to use.public static void getFont(character fontName)
fontName - The value for the font name currently in use.public static void setZoomFactor(java.lang.String zoomType)
zoomType - The new String value for the current zoom type.public static void setZoomFactor(character zoomType)
zoomType - The new String value for the current zoom type.public static void getZoomFactor(character zoomType)
zoomType - The value for the zoom type currently in use.public static void getFontHeight(decimal fontHeight)
fontHeight - The currently used font height value in metric units.public static void setFontHeight(float fontHeight)
fontHeight - The font height value in pics to use.public static void setFontHeight(integer fontHeight)
fontHeight - The font height value in pics to use.public static void getTextWidth(java.lang.String textToMeasure,
decimal textWidth)
textToMeasure - The text to calculate width.textWidth - The width of the text in metric units.public static void getTextWidth(character textToMeasure, decimal textWidth)
textToMeasure - The text to calculate width.textWidth - The width of the text in metric units.public static void setXY(double x,
double y)
x - The new X position.y - The new Y position.public static void setXY(decimal x, decimal y)
x - The new X position.y - The new Y position.public static void setXY(double x,
decimal y)
x - The new X position.y - The new Y position.public static void setXY(decimal x, double y)
x - The new X position.y - The new Y position.public static void setLeftMargin(double leftMargin)
leftMargin - The new left margin value.public static void setLeftMargin(decimal leftMargin)
leftMargin - The new left margin value.public static void getXY(decimal x, decimal y)
x - The returned X position.y - The returned Y position.public static void startNewTextLine()
public static void setInterleaving(double extraYSpace)
extraYSpace - The new extra Y distance between rows.public static void setInterleaving(decimal extraYSpace)
extraYSpace - The new extra Y distance between rows.public static void getFreeSpaceDown(decimal freeSpaceDown)
freeSpaceDown - The remaining vertical free space on the current page.public static void getFreeSpaceRight(decimal freeSpaceRight)
freeSpaceRight - The remaining horizontal free space on the current line(page).public static void drawText(java.lang.String text)
text - The new text to draw at current position.public static void drawText(character text)
text - The new text to draw at current position.public static void drawTextAndSetX(double x,
java.lang.String text)
x - The X position to set after text drawing in device independent units.text - The new text to draw at current position.public static void drawTextAndSetX(decimal x, character text)
x - The X position to set after text drawing in device independent units.text - The new text to draw at current position.public static void drawTextAtX(double x,
java.lang.String text,
java.lang.String align)
x - The X position for text to draw in device independent units.text - The new text to draw at the given position.align - The alignment value, either left or right.public static void drawTextAtXLeft(double x,
java.lang.String text)
x - The X position for text to draw in device independent units.text - The new text to draw at the given position.public static void drawTextAtXLeft(decimal x, character text)
x - The X position for text to draw in device independent units.text - The new text to draw at the given position.public static void drawTextAtXRight(double x,
java.lang.String text)
x - The X position for text to draw in device independent units.text - The new text to draw at the given position.public static void drawTextAtXRight(decimal x, character text)
x - The X position for text to draw in device independent units.text - The new text to draw at the given position.public static void drawTextBetween(double left,
double right,
java.lang.String text,
java.lang.String align)
left - The left X position for text to draw in device independent units.right - The right X position for text to draw in device independent units.text - The new text to fit and draw in the given positions.align - The alignment value, either left or right.public static void drawTextBetween(decimal left, decimal right, character text, java.lang.String align)
left - The left X position for text to draw in device independent units.right - The right X position for text to draw in device independent units.text - The new text to fit and draw in the given positions.align - The alignment value, either left or right.public static void drawTextBetweenLeft(double left,
double right,
java.lang.String text)
left - The left X position for text to draw in device independent units.right - The right X position for text to draw in device independent units.text - The new text to fit and draw in the given positions.public static void drawTextBetweenLeft(decimal left, decimal right, character text)
left - The left X position for text to draw in device independent units.right - The right X position for text to draw in device independent units.text - The new text to fit and draw in the given positions.public static void drawTextBetweenRight(double left,
double right,
java.lang.String text)
left - The left X position for text to draw in device independent units.right - The right X position for text to draw in device independent units.text - The new text to fit and draw in the given positions.public static void drawTextBetweenRight(decimal left, decimal right, character text)
left - The left X position for text to draw in device independent units.right - The right X position for text to draw in device independent units.text - The new text to fit and draw in the given positions.public static void setLineAttributes(java.lang.String style,
double thickness,
int redColor,
int greenColor,
int blueColor)
style - The new String value for the current line style. The valid style values:
"solid", "dash", "dot", "dashdot", "dashdotdot", "null", "insideframe".thickness - The thick of the line in device independent units.redColor - The new red part of the color value.greenColor - The new green part of the color value.blueColor - The new blue part of the color value.public static void setLineAttributes(java.lang.String style,
decimal thickness,
int redColor,
int greenColor,
int blueColor)
style - The new String value for the current line style. The valid style values:
"solid", "dash", "dot", "dashdot", "dashdotdot", "null", "insideframe".thickness - The thick of the line in device independent units.redColor - The new red part of the color value.greenColor - The new green part of the color value.blueColor - The new blue part of the color value.public static void setLineAttributes(character style, decimal thickness, integer redColor, integer greenColor, integer blueColor)
style - The new String value for the current line style. The valid style values:
"solid", "dash", "dot", "dashdot", "dashdotdot", "null", "insideframe".thickness - The thick of the line in device independent units.redColor - The new red part of the color value.greenColor - The new green part of the color value.blueColor - The new blue part of the color value.public static void setLineColor(int rgbColor)
rgbColor - The new 32-bit color value packed in int value.public static void setLineColor(integer rgbColor)
rgbColor - The new 32-bit color value packed in int value.public static void setLineStyle(java.lang.String style,
double thickness)
style - The new String value for the current line style. The valid style values:
"solid", "dash", "dot", "dashdot", "dashdotdot", "null", "insideframe".thickness - The thick of the line in device independent units.public static void setLineStyle(java.lang.String style,
decimal thickness)
style - The new String value for the current line style. The valid style values:
"solid", "dash", "dot", "dashdot", "dashdotdot", "null", "insideframe".thickness - The thick of the line in device independent units.public static void setLineStyle(character style, decimal thickness)
style - The new String value for the current line style. The valid style values:
"solid", "dash", "dot", "dashdot", "dashdotdot", "null", "insideframe".thickness - The thick of the line in device independent units.public static void setFillColor(int rgbColor)
rgbColor - The new 32-bit color value packed in int value.public static void setFillColor(integer rgbColor)
rgbColor - The new 32-bit color value packed in int value.public static void drawLine(double left,
double top,
double right,
double bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawLine(decimal left, decimal top, decimal right, decimal bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawLine(double left,
decimal top,
decimal right,
decimal bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawLine(decimal left, decimal top, double right, decimal bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawLine(double left,
decimal top,
double right,
decimal bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawLine(decimal left, double top, double right, double bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawLine(decimal left, double top, decimal right, double bottom)
left - The left X position of the line start.top - The top Y position of the line start.right - The right X position of the line start.bottom - The bottom Y position of the line start.public static void drawRect(double left,
double top,
double right,
double bottom)
left - The left X position of the rectangle.top - The top Y position of the rectangle.right - The right X position of the rectangle.bottom - The bottom Y position of the rectangle.public static void drawRect(decimal left, decimal top, decimal right, decimal bottom)
left - The left X position of the rectangle.top - The top Y position of the rectangle.right - The right X position of the rectangle.bottom - The bottom Y position of the rectangle.public static void drawRect(double left,
decimal top,
decimal right,
decimal bottom)
left - The left X position of the rectangle.top - The top Y position of the rectangle.right - The right X position of the rectangle.bottom - The bottom Y position of the rectangle.public static void drawFilledRect(double left,
double top,
double right,
double bottom)
left - The left X position of the rectangle.top - The top Y position of the rectangle.right - The right X position of the rectangle.bottom - The bottom Y position of the rectangle.public static void drawFilledRect(decimal left, decimal top, decimal right, decimal bottom)
left - The left X position of the rectangle.top - The top Y position of the rectangle.right - The right X position of the rectangle.bottom - The bottom Y position of the rectangle.public static void setImageAlign(java.lang.String horizAlign,
java.lang.String vertAlign)
horizAlign - The new String value for horizontal text alignment. The valid alignment values:
"left", "center", "right".vertAlign - The new String value for vertical text alignment. The valid alignment values:
"top", "baseline", "bottom".public static void drawImage(java.lang.String option,
double x,
double y,
double width,
double height,
java.lang.String filename,
decimal imgWidth,
decimal imgHeight)
option - The image painting option for example "origratio=yes".x - The image X position.y - The image Y position.width - The image width in metric units.height - The image height in metric units.filename - The name of the file to use as image.imgWidth - The final painted image width in metric units(return value).imgHeight - The final painted image height in metric units(return value).public static void drawImage(java.lang.String option,
decimal x,
decimal y,
decimal width,
decimal height,
character filename,
decimal imgWidth,
decimal imgHeight)
option - The image painting option for example "origratio=yes".x - The image X position.y - The image Y position.width - The image width in metric units.height - The image height in metric units.filename - The name of the file to use as image.imgWidth - The final painted image width in metric units(return value).imgHeight - The final painted image height in metric units(return value).public static void drawImage(character option, decimal x, decimal y, decimal width, decimal height, character filename, decimal imgWidth, decimal imgHeight)
option - The image painting option for example "origratio=yes".x - The image X position.y - The image Y position.width - The image width in metric units.height - The image height in metric units.filename - The name of the file to use as image.imgWidth - The final painted image width in metric units(return value).imgHeight - The final painted image height in metric units(return value).public static void drawImage(java.lang.String option,
decimal x,
decimal y,
double width,
double height,
character filename,
decimal imgWidth,
decimal imgHeight)
option - The image painting option for example "origratio=yes".x - The image X position.y - The image Y position.width - The image width in metric units.height - The image height in metric units.filename - The name of the file to use as image.imgWidth - The final painted image width in metric units(return value).imgHeight - The final painted image height in metric units(return value).public static void drawImagePart(double x,
double y,
int widthPix,
int heightPix,
double maxWidthCm,
java.lang.String filename)
x - The image X position.y - The image Y position.widthPix - The image width in pixels.heightPix - The image height in pixels.maxWidthCm - The image maximum right border not to exceed.filename - The name of the file to use as image.public static void drawImagePart(decimal x, decimal y, integer widthPix, integer heightPix, decimal maxWidthCm, character filename)
x - The image X position.y - The image Y position.widthPix - The image width in pixels.heightPix - The image height in pixels.maxWidthCm - The image maximum right border not to exceed.filename - The name of the file to use as image.public static void setPageOrientation(character mode)
mode - The new String value for page orientation. The valid alignment values:
"standard", "portrait", "landscape".public static void setPageOrientation(java.lang.String mode)
mode - The new String value for page orientation. The valid alignment values:
"standard", "portrait", "landscape".public static void getPageWidth(decimal pageWidth)
pageWidth - The current page width value in device independent units.public static void getPageHeight(decimal pageHeight)
pageHeight - The current page height value in device independent units.public static void resetPage(java.lang.String mode,
int newMaxPageNum)
mode - The new String value for page mode. The valid values: "append", "new".newMaxPageNum - The integer max page number value.public static void resetPage(java.lang.String mode,
integer newMaxPageNum)
mode - The new String value for page mode. The valid values: "append", "new".newMaxPageNum - The integer max page number value.public static void getPageNumber(integer pageNum)
pageNum - The current integer page number value.public static void setPageNumber(int newPageNum)
newPageNum - The integer page number value.public static void setPageNumberPosition(double x,
double y)
x - The new X position for page nummber.y - The new Y position for page nummber.public static void setPageNumberPosition(decimal x, decimal y)
x - The new X position for page nummber.y - The new Y position for page nummber.public static void setPageNumberText(java.lang.String text,
int pgNumberNdx)
text - The new text for page number.pgNumberNdx - The index of new text for page number.public static void setPageNumberText(character text, int pgNumberNdx)
text - The new text for page number.pgNumberNdx - The index of new text for page number.public static void setPageNumberText(double x,
double y,
java.lang.String text)
x - The new X position for page nummber.y - The new Y position for page nummber.text - The new text for page number.public static void setPageNumberText(decimal x, decimal y, character text)
x - The new X position for page nummber.y - The new Y position for page nummber.text - The new text for page number.public static void showPageFooter(int show)
show - The 1 value means show footer, 0 means no footer.public static void showPageFooter(integer show)
show - The 1 value means show footer, 0 means no footer.public static void initialize(double footerTextHeight,
java.lang.String tmpDir,
integer ok)
footerTextHeight - The height of the footed text in device independent units.tmpDir - The temporary directory to use.ok - The return value, meaning success init or not.public static void initialize(decimal footerTextHeight, character tmpDir, integer ok)
footerTextHeight - The height of the footed text in device independent units.tmpDir - The temporary directory to use.ok - The return value, meaning success init or not.public static java.lang.String getTmpDirectory()
public static void makePdf(java.lang.String pdfFileName)
pdfFileName - The name of the PDF file to create.public static void makePdf(character pdfFileName)
pdfFileName - The name of the PDF file to create.public static void makePdf(character pdfFileName, boolean openFilePDF)
pdfFileName - The name of the PDF file to create.openFilePDF - preview prevents opening the PDF file instantlypublic static void makePdf(java.lang.String pdfFileName,
logical openFilePDF)
pdfFileName - The name of the PDF file to create.openFilePDF - preview prevents opening the PDF file instantlypublic static void makePdf(character pdfFileName, logical openFilePDF)
pdfFileName - The name of the PDF file to create.openFilePDF - preview prevents opening the PDF file instantlypublic static void makePdf(java.lang.String pdfFileName,
boolean openFilePDF)
pdfFileName - The name of the PDF file to create.openFilePDF - preview prevents opening the PDF file instantlypublic static void stopRecording()
public static void interruptRecording()
public static double x2Col(double x)
x - The X coordinate to transform.public static double y2Row(double y)
y - The Y coordinate to transform.public static void pix2MfUnits(int pixelValue,
decimal mfUnits)
pixelValue - The coordinate in pixels to transform.mfUnits - The device independent unit, can be inch/cm/mm.public static void pix2MfUnits(integer pixelValue, decimal mfUnits)
pixelValue - The coordinate in pixels to transform.mfUnits - The device independent unit, can be inch/cm/mm.public static double pix2MfUnits(float pixelValue)
pixelValue - The coordinate in pixels to transform.public static int mfUnits2pix(double mfValue)
mfValue - The coordinate in metafile units to transform.public static boolean isParameterValid(BaseDataType op)
op - The parameter to test.TRUE if valid, FALSE otherwise.public static double getTextWeightScale(java.lang.String textToTest,
java.lang.String fontName,
boolean isBold,
boolean isItalic)
textToTest - The text to measure letters scale.fontName - The font to be used to draw the text.isBold - If the font to be used is bold or not.isItalic - If the font to be used is italic or not.private static Metafile resolveCurrentMetafile()