search/mag_sel search/close
Aspose::Words::Saving::PsSaveOptions Class Reference

Can be used to specify additional options when saving a document into the Ps format.

Examples

Shows how to save a document to the Postscript format in the form of a book fold.

auto doc = MakeObject<Document>(MyDir + u"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.
auto saveOptions = MakeObject<PsSaveOptions>();
saveOptions->set_SaveFormat(SaveFormat::Ps);
saveOptions->set_UseBookFoldPrintingSettings(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 (const auto& s : System::IterateOver<Section>(doc->get_Sections()))
{
s->get_PageSetup()->set_MultiplePages(MultiplePagesType::BookFoldPrinting);
}
// 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(ArtifactsDir + u"PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);

#include <Aspose.Words.Cpp/Saving/PsSaveOptions.h>

+ Inheritance diagram for Aspose::Words::Saving::PsSaveOptions:

Public Member Functions

 PsSaveOptions ()
 
SaveFormat get_SaveFormat () override
 Specifies the format in which the document will be saved if this save options object is used. Can only be Ps. More...
 
bool get_UseBookFoldPrintingSettings () const
 Gets or sets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via MultiplePages. More...
 
virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void set_SaveFormat (SaveFormat value) override
 Setter for get_SaveFormat. More...
 
void set_UseBookFoldPrintingSettings (bool value)
 Setter for get_UseBookFoldPrintingSettings. More...
 
- Public Member Functions inherited from FixedPageSaveOptions
bool Equals (SharedPtr< Object > obj) override
 Determines whether the specified object is equal in value to the current object. More...
 
ColorMode get_ColorMode () const
 Gets or sets a value determining how colors are rendered. More...
 
int32_t get_JpegQuality () const
 Gets or sets a value determining the quality of the JPEG images inside Html document. More...
 
SharedPtr< MetafileRenderingOptionsget_MetafileRenderingOptions () const
 Allows to specify metafile rendering options. More...
 
NumeralFormat get_NumeralFormat () const
 Gets or sets NumeralFormat used for rendering of numerals. European numerals are used by default. More...
 
virtual bool get_OptimizeOutput ()
 Flag indicates whether it is required to optimize output. If this flag is set redundant nested canvases and empty canvases are removed, also neighbor glyphs with the same formatting are concatenated. Note: The accuracy of the content display may be affected if this property is set to true. Default is false. More...
 
SharedPtr< IPageSavingCallbackget_PageSavingCallback () const
 Allows to control how separate pages are saved when a document is exported to fixed page format. More...
 
SharedPtr< PageSetget_PageSet () const
 Gets or sets the pages to render. Default is all the pages in the document. More...
 
void set_ColorMode (ColorMode value)
 Setter for get_ColorMode. More...
 
void set_JpegQuality (int32_t value)
 Setter for get_JpegQuality. More...
 
void set_MetafileRenderingOptions (SharedPtr< MetafileRenderingOptions > value)
 Setter for get_MetafileRenderingOptions. More...
 
void set_NumeralFormat (NumeralFormat value)
 Setter for get_NumeralFormat. More...
 
virtual void set_OptimizeOutput (bool value)
 Setter for get_OptimizeOutput. More...
 
void set_PageSavingCallback (SharedPtr< IPageSavingCallback > value)
 Setter for get_PageSavingCallback. More...
 
void set_PageSet (SharedPtr< PageSet > value)
 Setter for get_PageSet. More...
 
- Public Member Functions inherited from SaveOptions
bool get_AllowEmbeddingPostScriptFonts () const
 Gets or sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false. More...
 
SharedPtr< TimeZoneInfoget_CustomTimeZoneInfo () const
 
String get_DefaultTemplate () const
 Gets or sets path to default template (including filename). Default value for this property is empty string. More...
 
Dml3DEffectsRenderingMode get_Dml3DEffectsRenderingMode () const
 Gets a value determining how 3D effects are rendered. More...
 
virtual DmlEffectsRenderingMode get_DmlEffectsRenderingMode ()
 Gets or sets a value determining how DrawingML effects are rendered. More...
 
DmlRenderingMode get_DmlRenderingMode () const
 Gets or sets a value determining how DrawingML shapes are rendered. More...
 
ImlRenderingMode get_ImlRenderingMode () const
 Gets or sets a value determining how ink (InkML) objects are rendered. More...
 
bool get_MemoryOptimization () const
 Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false. More...
 
bool get_PrettyFormat () const
 When true, pretty formats output where applicable. Default value is false. More...
 
String get_TempFolder () const
 Specifies the folder for temporary files used when saving to a DOC or DOCX file. By default this property is null and no temporary files are used. More...
 
bool get_UpdateCreatedTimeProperty () const
 Gets a value determining whether the CreatedTime property is updated before saving. Default value is false;. More...
 
bool get_UpdateFields () const
 Gets or sets a value determining if fields of certain types should be updated before saving the document to a fixed page format. Default value for this property is true. More...
 
bool get_UpdateLastPrintedProperty () const
 Gets or sets a value determining whether the LastPrinted property is updated before saving. More...
 
bool get_UpdateLastSavedTimeProperty () const
 Gets or sets a value determining whether the LastSavedTime property is updated before saving. More...
 
bool get_UpdateSdtContent () const
 Gets or sets value determining whether content of StructuredDocumentTag is updated before saving. More...
 
bool get_UseAntiAliasing () const
 Gets or sets a value determining whether or not to use anti-aliasing for rendering. More...
 
bool get_UseHighQualityRendering () const
 Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. More...
 
void set_AllowEmbeddingPostScriptFonts (bool value)
 Setter for get_AllowEmbeddingPostScriptFonts. More...
 
void set_CustomTimeZoneInfo (SharedPtr< TimeZoneInfo > value)
 
void set_DefaultTemplate (String value)
 Setter for get_DefaultTemplate. More...
 
void set_Dml3DEffectsRenderingMode (Dml3DEffectsRenderingMode value)
 Sets a value determining how 3D effects are rendered. More...
 
virtual void set_DmlEffectsRenderingMode (DmlEffectsRenderingMode value)
 Setter for get_DmlEffectsRenderingMode. More...
 
void set_DmlRenderingMode (DmlRenderingMode value)
 Setter for get_DmlRenderingMode. More...
 
void set_ImlRenderingMode (ImlRenderingMode value)
 Setter for get_ImlRenderingMode. More...
 
void set_MemoryOptimization (bool value)
 Setter for get_MemoryOptimization. More...
 
void set_PrettyFormat (bool value)
 Setter for get_PrettyFormat. More...
 
void set_TempFolder (String value)
 Setter for get_TempFolder. More...
 
void set_UpdateCreatedTimeProperty (bool value)
 Sets a value determining whether the CreatedTime property is updated before saving. Default value is false;. More...
 
void set_UpdateFields (bool value)
 Setter for get_UpdateFields. More...
 
void set_UpdateLastPrintedProperty (bool value)
 Setter for get_UpdateLastPrintedProperty. More...
 
void set_UpdateLastSavedTimeProperty (bool value)
 Setter for get_UpdateLastSavedTimeProperty. More...
 
void set_UpdateSdtContent (bool value)
 Setter for get_UpdateSdtContent. More...
 
void set_UseAntiAliasing (bool value)
 Setter for get_UseAntiAliasing. More...
 
void set_UseHighQualityRendering (bool value)
 Setter for get_UseHighQualityRendering. More...
 

Static Public Member Functions

static const TypeInfoType ()
 
- Static Public Member Functions inherited from FixedPageSaveOptions
static const TypeInfoType ()
 
- Static Public Member Functions inherited from SaveOptions
static SharedPtr< SaveOptionsCreateSaveOptions (SaveFormat saveFormat)
 Creates a save options object of a class suitable for the specified save format. More...
 
static SharedPtr< SaveOptionsCreateSaveOptions (String fileName)
 Creates a save options object of a class suitable for the file extension specified in the given file name. More...
 
static const TypeInfoType ()
 

Constructor & Destructor Documentation

◆ PsSaveOptions()

Aspose::Words::Saving::PsSaveOptions::PsSaveOptions ( )

Member Function Documentation

◆ get_SaveFormat()

Aspose::Words::SaveFormat Aspose::Words::Saving::PsSaveOptions::get_SaveFormat ( )
overridevirtual

Specifies the format in which the document will be saved if this save options object is used. Can only be Ps.

Examples

Shows how to save a document to the Postscript format in the form of a book fold.

auto doc = MakeObject<Document>(MyDir + u"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.
auto saveOptions = MakeObject<PsSaveOptions>();
saveOptions->set_SaveFormat(SaveFormat::Ps);
saveOptions->set_UseBookFoldPrintingSettings(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 (const auto& s : System::IterateOver<Section>(doc->get_Sections()))
{
s->get_PageSetup()->set_MultiplePages(MultiplePagesType::BookFoldPrinting);
}
// 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(ArtifactsDir + u"PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);

Implements Aspose::Words::Saving::SaveOptions.

◆ get_UseBookFoldPrintingSettings()

bool Aspose::Words::Saving::PsSaveOptions::get_UseBookFoldPrintingSettings ( ) const

Gets or sets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via MultiplePages.

If this option is specified, 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.

auto doc = MakeObject<Document>(MyDir + u"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.
auto saveOptions = MakeObject<PsSaveOptions>();
saveOptions->set_SaveFormat(SaveFormat::Ps);
saveOptions->set_UseBookFoldPrintingSettings(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 (const auto& s : System::IterateOver<Section>(doc->get_Sections()))
{
s->get_PageSetup()->set_MultiplePages(MultiplePagesType::BookFoldPrinting);
}
// 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(ArtifactsDir + u"PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::Saving::PsSaveOptions::GetType ( ) const
overridevirtual

◆ Is()

virtual bool Aspose::Words::Saving::PsSaveOptions::Is ( const System::TypeInfo target) const
overridevirtual

◆ set_SaveFormat()

void Aspose::Words::Saving::PsSaveOptions::set_SaveFormat ( Aspose::Words::SaveFormat  value)
overridevirtual

◆ set_UseBookFoldPrintingSettings()

void Aspose::Words::Saving::PsSaveOptions::set_UseBookFoldPrintingSettings ( bool  value)

◆ Type()

static const System::TypeInfo& Aspose::Words::Saving::PsSaveOptions::Type ( )
static