public class PsSaveOptions extends FixedPageSaveOptions
SaveFormat.PS format.
To learn more, visit the Specify Save Options documentation article.
Examples:
Shows how to save a document to the Postscript format in the form of a book fold.
Document doc = new Document(getMyDir() + "Paragraphs.docx");
// Create a "PsSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to PostScript.
// Set the "UseBookFoldPrintingSettings" property to "true" to arrange the contents
// in the output Postscript document in a way that helps us make a booklet out of it.
// Set the "UseBookFoldPrintingSettings" property to "false" to save the document normally.
PsSaveOptions saveOptions = new PsSaveOptions();
{
saveOptions.setSaveFormat(SaveFormat.PS);
saveOptions.setUseBookFoldPrintingSettings(renderTextAsBookFold);
}
// If we are rendering the document as a booklet, we must set the "MultiplePages"
// properties of the page setup objects of all sections to "MultiplePagesType.BookFoldPrinting".
for (Section s : doc.getSections()) {
s.getPageSetup().setMultiplePages(MultiplePagesType.BOOK_FOLD_PRINTING);
}
// Once we print this document on both sides of the pages, we can fold all the pages down the middle at once,
// and the contents will line up in a way that creates a booklet.
doc.save(getArtifactsDir() + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);
| Modifier and Type | Method and Description |
|---|---|
int |
getSaveFormat()
Specifies the format in which the document will be saved if this save options object is used.
|
boolean |
getUseBookFoldPrintingSettings()
Gets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via
PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int). |
void |
setSaveFormat(int value)
Specifies the format in which the document will be saved if this save options object is used.
|
void |
setUseBookFoldPrintingSettings(boolean value)
Sets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via
PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int). |
assertValidIdPrefix, equals, getColorMode, getJpegQuality, getMetafileRenderingOptions, getNumeralFormat, getOptimizeOutput, getPageSavingCallback, getPageSet, isValidIdPrefix, setColorMode, setJpegQuality, setMetafileRenderingOptions, setNumeralFormat, setOptimizeOutput, setPageSavingCallback, setPageSetcreateSaveOptions, createSaveOptions, getAllowEmbeddingPostScriptFonts, getCustomTimeZoneInfo, getDefaultTemplate, getDml3DEffectsRenderingMode, getDmlEffectsRenderingMode, getDmlRenderingMode, getExportGeneratorName, getImlRenderingMode, getMemoryOptimization, getPrettyFormat, getProgressCallback, getTempFolder, getUpdateAmbiguousTextFont, getUpdateCreatedTimeProperty, getUpdateFields, getUpdateLastPrintedProperty, getUpdateLastSavedTimeProperty, getUseAntiAliasing, getUseHighQualityRendering, setAllowEmbeddingPostScriptFonts, setCustomTimeZoneInfo, setDefaultTemplate, setDml3DEffectsRenderingMode, setDmlEffectsRenderingMode, setDmlRenderingMode, setExportGeneratorName, setImlRenderingMode, setMemoryOptimization, setPrettyFormat, setProgressCallback, setTempFolder, setUpdateAmbiguousTextFont, setUpdateCreatedTimeProperty, setUpdateFields, setUpdateLastPrintedProperty, setUpdateLastSavedTimeProperty, setUseAntiAliasing, setUseHighQualityRenderingpublic int getSaveFormat()
SaveFormat.PS.
Examples:
Shows how to save a document to the Postscript format in the form of a book fold.
Document doc = new Document(getMyDir() + "Paragraphs.docx");
// Create a "PsSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to PostScript.
// Set the "UseBookFoldPrintingSettings" property to "true" to arrange the contents
// in the output Postscript document in a way that helps us make a booklet out of it.
// Set the "UseBookFoldPrintingSettings" property to "false" to save the document normally.
PsSaveOptions saveOptions = new PsSaveOptions();
{
saveOptions.setSaveFormat(SaveFormat.PS);
saveOptions.setUseBookFoldPrintingSettings(renderTextAsBookFold);
}
// If we are rendering the document as a booklet, we must set the "MultiplePages"
// properties of the page setup objects of all sections to "MultiplePagesType.BookFoldPrinting".
for (Section s : doc.getSections()) {
s.getPageSetup().setMultiplePages(MultiplePagesType.BOOK_FOLD_PRINTING);
}
// Once we print this document on both sides of the pages, we can fold all the pages down the middle at once,
// and the contents will line up in a way that creates a booklet.
doc.save(getArtifactsDir() + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);
getSaveFormat in class SaveOptionsint value. The returned value is one of SaveFormat constants.public void setSaveFormat(int value)
SaveFormat.PS.
Examples:
Shows how to save a document to the Postscript format in the form of a book fold.
Document doc = new Document(getMyDir() + "Paragraphs.docx");
// Create a "PsSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to PostScript.
// Set the "UseBookFoldPrintingSettings" property to "true" to arrange the contents
// in the output Postscript document in a way that helps us make a booklet out of it.
// Set the "UseBookFoldPrintingSettings" property to "false" to save the document normally.
PsSaveOptions saveOptions = new PsSaveOptions();
{
saveOptions.setSaveFormat(SaveFormat.PS);
saveOptions.setUseBookFoldPrintingSettings(renderTextAsBookFold);
}
// If we are rendering the document as a booklet, we must set the "MultiplePages"
// properties of the page setup objects of all sections to "MultiplePagesType.BookFoldPrinting".
for (Section s : doc.getSections()) {
s.getPageSetup().setMultiplePages(MultiplePagesType.BOOK_FOLD_PRINTING);
}
// Once we print this document on both sides of the pages, we can fold all the pages down the middle at once,
// and the contents will line up in a way that creates a booklet.
doc.save(getArtifactsDir() + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);
setSaveFormat in class SaveOptionsvalue - The corresponding int value. The value must be one of SaveFormat constants.public boolean getUseBookFoldPrintingSettings()
PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).
Remarks:
If this option is specified, FixedPageSaveOptions.getPageSet() / FixedPageSaveOptions.setPageSet(com.aspose.words.PageSet) is ignored when saving. This behavior matches MS Word. If book fold printing settings are not specified in page setup, this option will have no effect.
Examples:
Shows how to save a document to the Postscript format in the form of a book fold.
Document doc = new Document(getMyDir() + "Paragraphs.docx");
// Create a "PsSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to PostScript.
// Set the "UseBookFoldPrintingSettings" property to "true" to arrange the contents
// in the output Postscript document in a way that helps us make a booklet out of it.
// Set the "UseBookFoldPrintingSettings" property to "false" to save the document normally.
PsSaveOptions saveOptions = new PsSaveOptions();
{
saveOptions.setSaveFormat(SaveFormat.PS);
saveOptions.setUseBookFoldPrintingSettings(renderTextAsBookFold);
}
// If we are rendering the document as a booklet, we must set the "MultiplePages"
// properties of the page setup objects of all sections to "MultiplePagesType.BookFoldPrinting".
for (Section s : doc.getSections()) {
s.getPageSetup().setMultiplePages(MultiplePagesType.BOOK_FOLD_PRINTING);
}
// Once we print this document on both sides of the pages, we can fold all the pages down the middle at once,
// and the contents will line up in a way that creates a booklet.
doc.save(getArtifactsDir() + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);
PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).public void setUseBookFoldPrintingSettings(boolean value)
PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).
Remarks:
If this option is specified, FixedPageSaveOptions.getPageSet() / FixedPageSaveOptions.setPageSet(com.aspose.words.PageSet) is ignored when saving. This behavior matches MS Word. If book fold printing settings are not specified in page setup, this option will have no effect.
Examples:
Shows how to save a document to the Postscript format in the form of a book fold.
Document doc = new Document(getMyDir() + "Paragraphs.docx");
// Create a "PsSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to PostScript.
// Set the "UseBookFoldPrintingSettings" property to "true" to arrange the contents
// in the output Postscript document in a way that helps us make a booklet out of it.
// Set the "UseBookFoldPrintingSettings" property to "false" to save the document normally.
PsSaveOptions saveOptions = new PsSaveOptions();
{
saveOptions.setSaveFormat(SaveFormat.PS);
saveOptions.setUseBookFoldPrintingSettings(renderTextAsBookFold);
}
// If we are rendering the document as a booklet, we must set the "MultiplePages"
// properties of the page setup objects of all sections to "MultiplePagesType.BookFoldPrinting".
for (Section s : doc.getSections()) {
s.getPageSetup().setMultiplePages(MultiplePagesType.BOOK_FOLD_PRINTING);
}
// Once we print this document on both sides of the pages, we can fold all the pages down the middle at once,
// and the contents will line up in a way that creates a booklet.
doc.save(getArtifactsDir() + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);
value - A boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).