java.lang.Object
com.aspose.words.SaveOutputParameters
public class SaveOutputParameters
Example:
Document doc = new Document(getMyDir() + "Document.docx");
// Save the document as a .doc and check parameters
SaveOutputParameters parameters = doc.save(getArtifactsDir() + "Document.SaveOutputParameters.doc");
Assert.assertEquals("application/msword", parameters.getContentType());
// A .docx or a .pdf will have different parameters
parameters = doc.save(getArtifactsDir() + "Document.SaveOutputParameters.pdf");
Assert.assertEquals("application/pdf", parameters.getContentType());
| Property Getters/Setters Summary | ||
|---|---|---|
java.lang.String | getContentType() | |
| Returns the Content-Type string (Internet Media Type) that identifies the type of the saved document. | ||
| Property Getters/Setters Detail |
|---|
getContentType | |
public java.lang.String getContentType() | |
Example:
Shows how to verify Content-Type strings from save output parameters.
Document doc = new Document(getMyDir() + "Document.docx");
// Save the document as a .doc and check parameters
SaveOutputParameters parameters = doc.save(getArtifactsDir() + "Document.SaveOutputParameters.doc");
Assert.assertEquals("application/msword", parameters.getContentType());
// A .docx or a .pdf will have different parameters
parameters = doc.save(getArtifactsDir() + "Document.SaveOutputParameters.pdf");
Assert.assertEquals("application/pdf", parameters.getContentType());