public class ContentDisposition
Note that the actual behavior on the client browser might be affected by security configuration of the browser. Example:
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 ");
// Fill the fields in the document with user data
doc.getMailMerge().execute(new String[]{"FullName", "Company", "Address", "City"},
new Object[]{"James Bond", "MI5 Headquarters", "Milbank", "London"});
Field Summary | ||
---|---|---|
static final 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.
|
||
static final int | INLINE | |
Send the document to the browser and presents an option to save the document to disk or open inside the browser.
|
public static final int ATTACHMENT
public static final int INLINE