org.foray.pdf.object
Class PDFDate
java.lang.Object
org.foray.pdf.object.PDFObject
org.foray.pdf.object.PDFDate
public class PDFDate
- extends PDFObject
Represents a Date object in PDF. Date is listed as a PDF Data Type in PDF
Reference, 3rd Edition, Table 3.22. The Date data type is discussed at
Section 3.8.2.
Dates are technically PDF strings, probably actually PDF text strings,
so it is tempting to make this class a subclass of PDFTextString. However,
since the output will always be ASCII characters (as far as we know), there
is currently no benefit to doing so.
Method Summary |
String |
toPDF()
Generates the PDF text necessary to represent the object, returning it
as a String. |
Methods inherited from class org.foray.pdf.object.PDFObject |
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDFDate
public PDFDate(PDFDocument doc,
Date date)
- Create a PDFDate instance.
- Parameters:
doc
- The parent PDF document.date
- The Date to be encapsulated.
toPDF
public String toPDF()
- Description copied from class:
PDFObject
- Generates the PDF text necessary to represent the object, returning it
as a String.
- Returns:
- The PDF text necessary to represent the object.
Copyright © 2017. All rights reserved.