Determining the content type of a document

Determine the MIME type of a com.adobe.idp.Document object by invoking the com.adobe.idp.Document object’s getContentType method. This method returns a string value that specifies the content type of the com.adobe.idp.Document object. The following table describes the different content types that LiveCycle returns.

MIME type

Description

application/pdf

PDF document

application/vnd.adobe.xdp+xml

XML Data Packaging (XDP), which is used for exported XML Forms Architecture (XFA) forms

text/xml

Bookmarks, attachments, or other XML documents

application/vnd.fdf

Forms Data Format (FDF), which is used for exported Acrobat forms

application/vnd.adobe.xfdf

XML Forms Data Format (XFDF), which is used for exported Acrobat forms

application/rdf+xml

Rich data format and XML

application/octet-stream

Generic data format

NULL

Unspecified MIME type

The following code example determines the content type of a com.adobe.idp.Document object.

Determining the content type of a Document object

//Determine the content type of the Document object 
String ct = myDocument.getContentType(); 
System.out.println("The content type of the Document object is " +ct);

// Ethnio survey code removed