public final class XFAUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
XFAUtil.NameIndexPair |
Modifier and Type | Field and Description |
---|---|
static com.itextpdf.tool.xml.css.CssUtils |
cssUtils |
static float |
DEVIATION |
Constructor and Description |
---|
XFAUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
checkSomExpression(String refValue) |
static boolean |
equal(float a,
float b) |
static XFARectangle |
extractRectangleFromAttributes(Map<String,String> attributes) |
static String |
getAttributeValue(String attributeName,
Map<String,String> attributes) |
static boolean |
gt(float a,
float b) |
static boolean |
gte(float a,
float b) |
static byte[] |
inputStreamToByteArray(InputStream stream) |
static boolean |
lt(float a,
float b) |
static boolean |
lte(float a,
float b) |
static Float |
parseFloat(String s)
Parses an int from either a floating point or integer String.
|
static Float |
parseFloatToPt(String s) |
static Integer |
parseInt(String s) |
static Integer |
parseInt(String s,
Integer defaultValue) |
static ArrayList<Float> |
parseNumArray(String source)
Parses string that represents array of numbers (e.g.
|
static Float |
parsePercent(String s) |
static Float |
parsePxInCmMmPcToPt(String length) |
static com.itextpdf.text.BaseColor |
parseXfaColor(String xfaColor)
Parses XFA color to
BaseColor. |
static float |
reverseX(Float originX,
Float x) |
static float |
reverseY(Float originY,
Float y,
Float heigth) |
static void |
setMinAsDefault(XFARectangle contentArea)
Sets the minH as height if height == null and sets the minW as width if width == null.
|
static XFAUtil.NameIndexPair |
splitNameIndexPair(String nameIndexPair) |
public static final float DEVIATION
public static final com.itextpdf.tool.xml.css.CssUtils cssUtils
public static String getAttributeValue(String attributeName, Map<String,String> attributes)
public static Float parseFloat(String s)
s
- the String to parseNumberFormatException
- if an int could not be parsedpublic static XFARectangle extractRectangleFromAttributes(Map<String,String> attributes)
NoPositionParametersException
public static void setMinAsDefault(XFARectangle contentArea)
public static ArrayList<Float> parseNumArray(String source)
source
- source representation of array.public static com.itextpdf.text.BaseColor parseXfaColor(String xfaColor)
BaseColor. Curently only RGB colors are supported following XFA spec 3.1.
xfaColor
- source XFA color.public static boolean lt(float a, float b)
public static boolean gt(float a, float b)
public static boolean lte(float a, float b)
public static boolean gte(float a, float b)
public static boolean equal(float a, float b)
public static byte[] inputStreamToByteArray(InputStream stream) throws IOException
IOException
public static XFAUtil.NameIndexPair splitNameIndexPair(String nameIndexPair)
Copyright (C) 1998-2018 iText Group NV. All Rights Reserved.