ContentDisposition

Inheritance: java.lang.Object

public class ContentDisposition

Enumerates different ways of presenting the document at the client browser.

Remarks:

Note that the actual behavior on the client browser might be affected by security configuration of the browser.

Examples:

Shows how to perform a mail merge, and then save the document to the client browser.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 builder.insertField(" MERGEFIELD FullName ");
 builder.insertParagraph();
 builder.insertField(" MERGEFIELD Company ");
 builder.insertParagraph();
 builder.insertField(" MERGEFIELD Address ");
 builder.insertParagraph();
 builder.insertField(" MERGEFIELD City ");

 doc.getMailMerge().execute(new String[]{"FullName", "Company", "Address", "City"},
         new Object[]{"James Bond", "MI5 Headquarters", "Milbank", "London"});
 

Fields

FieldDescription
ATTACHMENTSend the document to the browser and present an option to save the document to disk or open in the application associated with the document’s extension.
INLINESend the document to the browser and presents an option to save the document to disk or open inside the browser.
length

Methods

MethodDescription
fromName(String contentDispositionName)
getName(int contentDisposition)
getValues()
toString(int contentDisposition)

ATTACHMENT

public static int ATTACHMENT

Send the document to the browser and present an option to save the document to disk or open in the application associated with the document’s extension.

INLINE

public static int INLINE

Send the document to the browser and presents an option to save the document to disk or open inside the browser.

length

public static int length

fromName(String contentDispositionName)

public static int fromName(String contentDispositionName)

Parameters:

ParameterTypeDescription
contentDispositionNamejava.lang.String

Returns: int

getName(int contentDisposition)

public static String getName(int contentDisposition)

Parameters:

ParameterTypeDescription
contentDispositionint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int contentDisposition)

public static String toString(int contentDisposition)

Parameters:

ParameterTypeDescription
contentDispositionint

Returns: java.lang.String