iText 8.0.5 API
iText.Kernel.Pdf.PdfDate Class Reference

PdfDate is the PDF date object. PDF defines a standard date format. The PDF date format closely follows the format defined by the international standard ASN.1 (Abstract Syntax Notation One, defined in CCITT X.208 or ISO/IEC 8824). A date is a PdfString of the form: (D:YYYYMMDDHHmmSSOHH'mm') See also ISO-320001 7.9.4, "Dates". More...

Inheritance diagram for iText.Kernel.Pdf.PdfDate:
iText.Kernel.Pdf.PdfObjectWrapper< PdfString >

Public Member Functions

  PdfDate (DateTime d)
  Constructs a PdfDate -object. More...
 
  PdfDate ()
  Constructs a PdfDate -object, representing the current day and time. More...
 
virtual String  GetW3CDate ()
  Gives the W3C format of the PdfDate. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfString >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual void  Flush ()
 
virtual bool  IsFlushed ()
 

Static Public Member Functions

static String  GetW3CDate (String d)
  Gives the W3C format of the PdfDate More...
 
static DateTime  Decode (String s)
  Converts a PDF string representing a date into a DateTime More...
 

Package Functions

override bool  IsWrappedObjectMustBeIndirect ()
  Defines if the object behind this wrapper must be an indirect object in the resultant document. More...
 
- Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfString >
  PdfObjectWrapper (T pdfObject)
 
virtual void  SetPdfObject (T pdfObject)
 
virtual void  SetForbidRelease ()
 
virtual void  UnsetForbidRelease ()
 
virtual void  EnsureUnderlyingObjectHasIndirectReference ()
 

Additional Inherited Members

- Static Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfString >
static void  MarkObjectAsIndirect (PdfObject pdfObject)
 
static void  EnsureObjectIsAddedToDocument (PdfObject @object)
  Some wrappers use object's indirect reference to obtain the PdfDocument to which the object belongs to. More...
 

Detailed Description

PdfDate is the PDF date object.

PDF defines a standard date format. The PDF date format closely follows the format defined by the international standard ASN.1 (Abstract Syntax Notation One, defined in CCITT X.208 or ISO/IEC 8824). A date is a PdfString of the form:

(D:YYYYMMDDHHmmSSOHH'mm')

See also ISO-320001 7.9.4, "Dates".

See also
PdfString, Java.Util.GregorianCalendar

Constructor & Destructor Documentation

◆ PdfDate() [1/2]

iText.Kernel.Pdf.PdfDate.PdfDate ( DateTime  d )
inline

Constructs a PdfDate -object.

Parameters
d the date that has to be turned into a PdfDate >-object

◆ PdfDate() [2/2]

iText.Kernel.Pdf.PdfDate.PdfDate ( )
inline

Constructs a PdfDate -object, representing the current day and time.

Member Function Documentation

◆ Decode()

static DateTime iText.Kernel.Pdf.PdfDate.Decode ( String  s )
inlinestatic

Converts a PDF string representing a date into a DateTime

Parameters
s the PDF string representing a date
Returns
a DateTime representing the date

◆ GetW3CDate() [1/2]

virtual String iText.Kernel.Pdf.PdfDate.GetW3CDate ( )
inlinevirtual

Gives the W3C format of the PdfDate.

Returns
a formatted date

◆ GetW3CDate() [2/2]

static String iText.Kernel.Pdf.PdfDate.GetW3CDate ( String  d )
inlinestatic

Gives the W3C format of the PdfDate

Parameters
d the date in the format D:YYYYMMDDHHmmSSOHH'mm'
Returns
a formatted date

◆ IsWrappedObjectMustBeIndirect()

override bool iText.Kernel.Pdf.PdfDate.IsWrappedObjectMustBeIndirect ( )
inlinepackagevirtual

Defines if the object behind this wrapper must be an indirect object in the resultant document.

Defines if the object behind this wrapper must be an indirect object in the resultant document.

If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.

Return value of this method shouldn't depend on any logic, it should return always true or false.

Returns
true if in the resultant document the object behind the wrapper must be indirect, otherwise false.

Implements iText.Kernel.Pdf.PdfObjectWrapper< PdfString >.