public final class PresentationSaveOptions extends Object implements ISaveOptions
Allows to specify custom options for generating and saving Presentation (PowerPoint-compatible) documents
| Constructor and Description |
|---|
PresentationSaveOptions()
This parameterless constructor creates a new instance of PresentationSaveOptions with PPTX output format (can be modified then through
OutputFormat(getOutputFormat()/setOutputFormat(PresentationFormats)) property) |
PresentationSaveOptions(PresentationFormats outputFormat)
Creates a new instance of PresentationSaveOptions with specified
mandatory Presentation output format, while all other parameters are
default
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getInsertAsNewSlide()
Boolean flag, which specifies whether edited slide should replace the existing slide in original presentation on the position, specified by the
SlideNumber(getSlideNumber()/setSlideNumber(int)) property, or it should be injected between existing slide and previous one, without replacing its content. |
PresentationFormats |
getOutputFormat()
Allows to specify a Presentation format, which will be used for saving the document
|
String |
getPassword()
Allows to specify, modify and obtain the password, which will be used for
encoding the resultant Presentation document.
|
int |
getSlideNumber()
Allows to insert edited slide into existing presentation instead of creating a new single-slide presentation (default behavior).
|
void |
setInsertAsNewSlide(boolean value)
Boolean flag, which specifies whether edited slide should replace the existing slide in original presentation on the position, specified by the
SlideNumber(getSlideNumber()/setSlideNumber(int)) property, or it should be injected between existing slide and previous one, without replacing its content. |
void |
setOutputFormat(PresentationFormats value)
Allows to specify a Presentation format, which will be used for saving the document
|
void |
setPassword(String value)
Allows to specify, modify and obtain the password, which will be used for encoding the resultant Presentation document.
|
void |
setSlideNumber(int value)
Allows to insert edited slide into existing presentation instead of creating a new single-slide presentation (default behavior).
|
public PresentationSaveOptions()
This parameterless constructor creates a new instance of PresentationSaveOptions with PPTX output format (can be modified then through OutputFormat(getOutputFormat()/setOutputFormat(PresentationFormats)) property)
public PresentationSaveOptions(PresentationFormats outputFormat)
Creates a new instance of PresentationSaveOptions with specified mandatory Presentation output format, while all other parameters are default
outputFormat - Mandatory output format, in which the Presentation
document should be savedpublic final boolean getInsertAsNewSlide()
Boolean flag, which specifies whether edited slide should replace the existing slide in original presentation on the position, specified by the SlideNumber(getSlideNumber()/setSlideNumber(int)) property, or it should be injected between existing slide and previous one, without replacing its content.
By default is false — existing slide will be replaced. This property is ignored, if value of SlideNumber(getSlideNumber()/setSlideNumber(int)) property is set to '0'.
SlideNumber(getSlideNumber()/setSlideNumber(int))=4, then 4th slide will be replaced with the new edited slide, while the total amount of slides in presentation (5) will remain untouched.
However, if value of this property is set to <i>true</i>, the new edited slide will be injected as 4th slide, and all subsequent slides wil be shifter to the end: "old" 4th slide becomes 5th, and 5th becomes 6th, and the total amount of slides in presentation will be incremented by one and equal to 6.public final PresentationFormats getOutputFormat()
Allows to specify a Presentation format, which will be used for saving the document
PresentationSaveOptions class was already created.public final String getPassword()
Allows to specify, modify and obtain the password, which will be used for encoding the resultant Presentation document. By default is NULL - password will not be set. Set to NULL or empty string in order to remove the password, if it was set previously.
public final int getSlideNumber()
Allows to insert edited slide into existing presentation instead of creating a new single-slide presentation (default behavior). Slide number is a 1-based number of a slide in the presentation, loaded in the Editor class. If it is 0 (default value), the new presentation will be created with single edited slide. If it is greater or lesser then zero, and there is valid presentation, loaded in the Editor class, the edited slide, stored inside input EditableDocument instance, will be inserted into this presentation.
Given presentation has 5 slides: SlideNumber = 0; — ignore given presentation, create a new presentation and put edited slide into it. SlideNumber = 1; — replace the first slide with edited SlideNumber = 2; — replace the second slide with edited SlideNumber = 5; — replace the last (5th) slide with edited SlideNumber = 6; — replace the last (5th) slide with edited, because 6 is greater then 5 and thus is adjusted SlideNumber = -1; — replace the last (5th) slide with edited, because "-1" means "last existing" SlideNumber = -2; — replace the 4th slide with edited SlideNumber = -3; — replace the 3rd slide with edited SlideNumber = -4; — replace the 2nd slide with edited SlideNumber = -5; — replace the first slide with edited SlideNumber = -6; — replace the first slide with edited, because "-6" is greater then 5 and thus is adjusted
<i>SlideNumber</i> integer property, if it is not in default state (reserved value '0'), represents a slide number, so it starts from 1, not from zero, and its max value is the amount of all existing slides in a presentation. However, if specified value is greater then amount of all slides, GroupDocs.Editor will adjust it to mark the last slide. Negative values are also allowed and count slides from end. For example, "-1" implies last slide in a presentation, "-2" — last but one, etc. Like with positive values, when negative slide number exceeds the total count of slides in the given presentation, it will be adjusted to the first slide.
The InsertAsNewSlide(getInsertAsNewSlide()/setInsertAsNewSlide(boolean)) boolean property is tightly coupled with this one.
public final void setInsertAsNewSlide(boolean value)
Boolean flag, which specifies whether edited slide should replace the existing slide in original presentation on the position, specified by the SlideNumber(getSlideNumber()/setSlideNumber(int)) property, or it should be injected between existing slide and previous one, without replacing its content.
By default is false — existing slide will be replaced. This property is ignored, if value of SlideNumber(getSlideNumber()/setSlideNumber(int)) property is set to '0'.
SlideNumber(getSlideNumber()/setSlideNumber(int))=4, then 4th slide will be replaced with the new edited slide, while the total amount of slides in presentation (5) will remain untouched.
However, if value of this property is set to <i>true</i>, the new edited slide will be injected as 4th slide, and all subsequent slides wil be shifter to the end: "old" 4th slide becomes 5th, and 5th becomes 6th, and the total amount of slides in presentation will be incremented by one and equal to 6.public final void setOutputFormat(PresentationFormats value)
Allows to specify a Presentation format, which will be used for saving the document
PresentationSaveOptions class was already created.public final void setPassword(String value)
Allows to specify, modify and obtain the password, which will be used for encoding the resultant Presentation document. By default is NULL - password will not be set. Set to NULL or empty string in order to remove the password, if it was set previously.
public final void setSlideNumber(int value)
Allows to insert edited slide into existing presentation instead of creating a new single-slide presentation (default behavior). Slide number is a 1-based number of a slide in the presentation, loaded in the Editor class. If it is 0 (default value), the new presentation will be created with single edited slide. If it is greater or lesser then zero, and there is valid presentation, loaded in the Editor class, the edited slide, stored inside input EditableDocument instance, will be inserted into this presentation.
Given presentation has 5 slides: SlideNumber = 0; — ignore given presentation, create a new presentation and put edited slide into it. SlideNumber = 1; — replace the first slide with edited SlideNumber = 2; — replace the second slide with edited SlideNumber = 5; — replace the last (5th) slide with edited SlideNumber = 6; — replace the last (5th) slide with edited, because 6 is greater then 5 and thus is adjusted SlideNumber = -1; — replace the last (5th) slide with edited, because "-1" means "last existing" SlideNumber = -2; — replace the 4th slide with edited SlideNumber = -3; — replace the 3rd slide with edited SlideNumber = -4; — replace the 2nd slide with edited SlideNumber = -5; — replace the first slide with edited SlideNumber = -6; — replace the first slide with edited, because "-6" is greater then 5 and thus is adjusted
<i>SlideNumber</i> integer property, if it is not in default state (reserved value '0'), represents a slide number, so it starts from 1, not from zero, and its max value is the amount of all existing slides in a presentation. However, if specified value is greater then amount of all slides, GroupDocs.Editor will adjust it to mark the last slide. Negative values are also allowed and count slides from end. For example, "-1" implies last slide in a presentation, "-2" — last but one, etc. Like with positive values, when negative slide number exceeds the total count of slides in the given presentation, it will be adjusted to the first slide.
The InsertAsNewSlide(getInsertAsNewSlide()/setInsertAsNewSlide(boolean)) boolean property is tightly coupled with this one.
Copyright © 2024. All rights reserved.