Class PDFUtils
java.lang.Object
com.orsonpdf.PDFUtils
Various utility functions for working with the PDF format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]A utility method to convert a string to US-ASCII byte format.static StringtoDateFormat(Date date) Returns a string in standard PDF date format representing the specified date (in the default timezone).static StringtoPDFArray(boolean[] b) A utility method to convert a boolean[] to a PDF array string.static StringtoPDFArray(double[] d) A utility method to convert a double[] to a PDF array string.static StringtoPDFArray(float[] f) A utility method to convert a float[] to a PDF array string.static StringtoPDFDateFormat(Calendar calendar) Returns a string in standard PDF date format representing the date contained by the specified calendar.static StringReturns a Java2D AffineTransform in PDF matrix format.
-
Constructor Details
-
PDFUtils
private PDFUtils()
-
-
Method Details
-
toPDFArray
A utility method to convert a boolean[] to a PDF array string.- Parameters:
b- the array (nullnot permitted).- Returns:
- The string.
-
toPDFArray
A utility method to convert a float[] to a PDF array string.- Parameters:
f- the array (nullnot permitted).- Returns:
- The string.
-
toPDFArray
A utility method to convert a double[] to a PDF array string.- Parameters:
d- the array (nullnot permitted).- Returns:
- The string.
-
transformToPDF
Returns a Java2D AffineTransform in PDF matrix format.- Parameters:
t- the transform (nullnot permitted).- Returns:
- A PDF matrix string.
-
toDateFormat
-
toPDFDateFormat
-
toBytes
A utility method to convert a string to US-ASCII byte format.- Parameters:
s- the string.- Returns:
- The corresponding byte array.
-