public class LoadSaveOptions
extends java.lang.Object
Constructor and Description |
---|
LoadSaveOptions()
Creates a new instance of this class without any properties specified.
|
LoadSaveOptions(int saveFormat)
Creates a new instance of this class with the specified file format to save an assembled document to.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getResourceLoadBaseUri()
Gets a base URI to resolve external resource files' relative URIs to absolute ones while loading an HTML template document to be assembled and saved to a non-HTML format.
|
java.lang.String |
getResourceSaveFolder()
Gets a path to a folder to store external resource files while an assembled document loaded from a non-HTML format is being saved to HTML.
|
int |
getSaveFormat()
Gets a file format to save an assembled document to.
|
void |
setResourceLoadBaseUri(java.lang.String value)
Sets a base URI to resolve external resource files' relative URIs to absolute ones while loading an HTML template document to be assembled and saved to a non-HTML format.
|
void |
setResourceSaveFolder(java.lang.String value)
Sets a path to a folder to store external resource files while an assembled document loaded from a non-HTML format is being saved to HTML.
|
void |
setSaveFormat(int value)
Sets a file format to save an assembled document to.
|
public LoadSaveOptions()
public LoadSaveOptions(int saveFormat)
saveFormat
- A file format to save an assembled document to. The value must be one of FileFormat
constants.public int getSaveFormat()
FileFormat.UNSPECIFIED
is the default.
When the value of this property is not specified, DocumentAssembler
behaves as follows:
- When you specify a file path to save an assembled document, the save file format is determined upon file extension from the path.
- When you specify a stream to save an assembled document, the save file format remains the same as the file format of a loaded template document.
Beware that it is not always possible to save an assembled document to any file format using GroupDocs.Assembly. For example, it is impossible to save a document loaded from a Word Processing file format (such as DOCX) to a Spreadsheet file format (such as XLSX). For more information on possible combinations of load and save file formats supported by GroupDocs.Assembly, please check GroupDocs.Assembly online documentation.
FileFormat
constants.public void setSaveFormat(int value)
FileFormat.UNSPECIFIED
is the default.
When the value of this property is not specified, DocumentAssembler
behaves as follows:
- When you specify a file path to save an assembled document, the save file format is determined upon file extension from the path.
- When you specify a stream to save an assembled document, the save file format remains the same as the file format of a loaded template document.
Beware that it is not always possible to save an assembled document to any file format using GroupDocs.Assembly. For example, it is impossible to save a document loaded from a Word Processing file format (such as DOCX) to a Spreadsheet file format (such as XLSX). For more information on possible combinations of load and save file formats supported by GroupDocs.Assembly, please check GroupDocs.Assembly online documentation.
value
- A file format to save an assembled document to. The value must be one of FileFormat
constants.public java.lang.String getResourceLoadBaseUri()
When loading an HTML document from a file, its containing folder is used as a base URI by default, which cannot happen when loading an HTML document from a stream. Set this property to specify a base URI when loading an HTML document from a stream or to override the default base URI when loading an HTML document from a file.
A value of this property is ignored in the following cases:
public void setResourceLoadBaseUri(java.lang.String value)
When loading an HTML document from a file, its containing folder is used as a base URI by default, which cannot happen when loading an HTML document from a stream. Set this property to specify a base URI when loading an HTML document from a stream or to override the default base URI when loading an HTML document from a file.
A value of this property is ignored in the following cases:
value
- A base URI to resolve external resource files' relative URIs to absolute ones while loading an HTML template document to be assembled and saved to a non-HTML format.public java.lang.String getResourceSaveFolder()
By default, when saving an assembled document to an HTML file, external resource files are stored to a folder having the same name as the HTML file without extension plus the "_files" suffix. This folder is located in the same folder as the HTML file. However, this cannot be done when saving an assembled document to an HTML stream. Set this property to specify a path to a folder to store external resource files when saving an assembled document to an HTML stream or to override the default folder when saving an assembled document to an HTML file.
A value of this property is ignored if an assembled document being saved to HTML was loaded from HTML as well (external resource files are not stored and links to them are not changed then).
public void setResourceSaveFolder(java.lang.String value)
By default, when saving an assembled document to an HTML file, external resource files are stored to a folder having the same name as the HTML file without extension plus the "_files" suffix. This folder is located in the same folder as the HTML file. However, this cannot be done when saving an assembled document to an HTML stream. Set this property to specify a path to a folder to store external resource files when saving an assembled document to an HTML stream or to override the default folder when saving an assembled document to an HTML file.
A value of this property is ignored if an assembled document being saved to HTML was loaded from HTML as well (external resource files are not stored and links to them are not changed then).
value
- A path to a folder to store external resource files while an assembled document loaded from a non-HTML format is being saved to HTML.