Class PsSaveOptions

Class PsSaveOptions

Namespace: Aspose.Words.Saving
Assembly: Aspose.Words.dll (25.12.0)

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

To learn more, visit the Specify Save Options documentation article.

public class PsSaveOptions : FixedPageSaveOptions

Inheritance

object SaveOptions FixedPageSaveOptions PsSaveOptions

Inherited Members

FixedPageSaveOptions.Equals(object) , FixedPageSaveOptions.AssertValidIdPrefix(string) , FixedPageSaveOptions.IsValidIdPrefix(string) , FixedPageSaveOptions.PageSet , FixedPageSaveOptions.PageSavingCallback , FixedPageSaveOptions.NumeralFormat , FixedPageSaveOptions.MetafileRenderingOptions , FixedPageSaveOptions.JpegQuality , FixedPageSaveOptions.ColorMode , FixedPageSaveOptions.OptimizeOutput , SaveOptions.CreateSaveOptions(SaveFormat) , SaveOptions.CreateSaveOptions(string) , SaveOptions.SaveFormat , SaveOptions.ExportGeneratorName , SaveOptions.TempFolder , SaveOptions.PrettyFormat , SaveOptions.UseAntiAliasing , SaveOptions.UseHighQualityRendering , SaveOptions.DmlRenderingMode , SaveOptions.DmlEffectsRenderingMode , SaveOptions.ImlRenderingMode , SaveOptions.DefaultTemplate , SaveOptions.UpdateFields , SaveOptions.UpdateLastSavedTimeProperty , SaveOptions.UpdateLastPrintedProperty , SaveOptions.UpdateCreatedTimeProperty , SaveOptions.MemoryOptimization , SaveOptions.UpdateAmbiguousTextFont , SaveOptions.Dml3DEffectsRenderingMode , SaveOptions.ProgressCallback , SaveOptions.AllowEmbeddingPostScriptFonts , SaveOptions.CustomTimeZoneInfo , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

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

Document doc = new Document(MyDir + "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
                                                                                            {
                                                                                                SaveFormat = SaveFormat.Ps,
                                                                                                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".
                                                                                            foreach (Section s in doc.Sections)
                                                                                            {
                                                                                                s.PageSetup.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 + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);

Constructors

PsSaveOptions()

public PsSaveOptions()

Properties

SaveFormat

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

public override SaveFormat SaveFormat { get; set; }

Property Value

SaveFormat

Examples

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

Document doc = new Document(MyDir + "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
                                                                                            {
                                                                                                SaveFormat = SaveFormat.Ps,
                                                                                                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".
                                                                                            foreach (Section s in doc.Sections)
                                                                                            {
                                                                                                s.PageSetup.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 + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);

UseBookFoldPrintingSettings

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

public bool UseBookFoldPrintingSettings { get; set; }

Property Value

bool

Examples

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

Document doc = new Document(MyDir + "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
                                                                                            {
                                                                                                SaveFormat = SaveFormat.Ps,
                                                                                                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".
                                                                                            foreach (Section s in doc.Sections)
                                                                                            {
                                                                                                s.PageSetup.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 + "PsSaveOptions.UseBookFoldPrintingSettings.ps", saveOptions);

Remarks

<p>

If this option is specified, Aspose.Words.Saving.FixedPageSaveOptions.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.

 English