com.aspose.words

Class ContentDisposition

  • java.lang.Object
    • com.aspose.words.ContentDisposition
public class ContentDisposition 
extends java.lang.Object

Utility class containing constants. Enumerates different ways of presenting the document at the client browser.

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

Example:

Performs a simple insertion of data into merge fields and sends the document to the browser inline.
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 intATTACHMENT = 0
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 intINLINE = 1
Send the document to the browser and presents an option to save the document to disk or open inside the browser.
 

    • Field Detail

      • ATTACHMENT = 0

        public 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.
      • INLINE = 1

        public 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.