Package com.orsonpdf
Class PDFUtils
- java.lang.Object
-
- com.orsonpdf.PDFUtils
-
public class PDFUtils extends java.lang.ObjectVarious utility functions for working with the PDF format.
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePDFUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]toBytes(java.lang.String s)A utility method to convert a string to US-ASCII byte format.static java.lang.StringtoDateFormat(java.util.Date date)Returns a string in standard PDF date format representing the specified date (in the default timezone).static java.lang.StringtoPDFArray(boolean[] b)A utility method to convert a boolean[] to a PDF array string.static java.lang.StringtoPDFArray(double[] d)A utility method to convert a double[] to a PDF array string.static java.lang.StringtoPDFArray(float[] f)A utility method to convert a float[] to a PDF array string.static java.lang.StringtoPDFDateFormat(java.util.Calendar calendar)Returns a string in standard PDF date format representing the date contained by the specified calendar.static java.lang.StringtransformToPDF(java.awt.geom.AffineTransform t)Returns a Java2D AffineTransform in PDF matrix format.
-
-
-
Method Detail
-
toPDFArray
public static java.lang.String toPDFArray(boolean[] b)
A utility method to convert a boolean[] to a PDF array string.- Parameters:
b- the array (nullnot permitted).- Returns:
- The string.
-
toPDFArray
public static java.lang.String toPDFArray(float[] f)
A utility method to convert a float[] to a PDF array string.- Parameters:
f- the array (nullnot permitted).- Returns:
- The string.
-
toPDFArray
public static java.lang.String toPDFArray(double[] d)
A utility method to convert a double[] to a PDF array string.- Parameters:
d- the array (nullnot permitted).- Returns:
- The string.
-
transformToPDF
public static java.lang.String transformToPDF(java.awt.geom.AffineTransform t)
Returns a Java2D AffineTransform in PDF matrix format.- Parameters:
t- the transform (nullnot permitted).- Returns:
- A PDF matrix string.
-
toDateFormat
public static java.lang.String toDateFormat(java.util.Date date)
Returns a string in standard PDF date format representing the specified date (in the default timezone).- Parameters:
date- the date (nullnot permitted).- Returns:
- A string in standard PDF date format.
-
toPDFDateFormat
public static java.lang.String toPDFDateFormat(java.util.Calendar calendar)
Returns a string in standard PDF date format representing the date contained by the specified calendar.- Parameters:
calendar- the date and timezone (nullnot permitted).- Returns:
- A string in standard PDF date format.
-
toBytes
public static byte[] toBytes(java.lang.String s)
A utility method to convert a string to US-ASCII byte format.- Parameters:
s- the string.- Returns:
- The corresponding byte array.
-
-