Aspose::Words::Saving::FixedPageSaveOptions class
Contents
[
Hide
]FixedPageSaveOptions class
Contains common options that can be specified when saving a document into fixed page formats (PDF, XPS, images etc). To learn more, visit the Specify Save Options documentation article.
class FixedPageSaveOptions : public SaveOptions
Methods
| Method | Description |
|---|---|
| Equals(System::SharedPtr<System::Object>) override | Determines whether the specified object is equal in value to the current object. |
| get_ColorMode() const | Gets or sets a value determining how colors are rendered. |
| get_JpegQuality() const | Gets or sets a value determining the quality of the JPEG images inside Html document. |
| get_MetafileRenderingOptions() const | Allows to specify metafile rendering options. |
| get_NumeralFormat() const | Gets or sets NumeralFormat used for rendering of numerals. European numerals are used by default. |
| virtual 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. |
| get_PageSavingCallback() const | Allows to control how separate pages are saved when a document is exported to fixed page format. |
| get_PageSet() const | Gets or sets the pages to render. Default is all the pages in the document. |
| set_ColorMode(Aspose::Words::Saving::ColorMode) | Sets a value determining how colors are rendered. |
| set_JpegQuality(int32_t) | Sets a value determining the quality of the JPEG images inside Html document. |
| set_MetafileRenderingOptions(const System::SharedPtr<Aspose::Words::Saving::MetafileRenderingOptions> &) | Allows to specify metafile rendering options. |
| set_NumeralFormat(Aspose::Words::Saving::NumeralFormat) | Sets NumeralFormat used for rendering of numerals. European numerals are used by default. |
| virtual set_OptimizeOutput(bool) | 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. |
| set_PageSavingCallback(const System::SharedPtr<Aspose::Words::Saving::IPageSavingCallback> &) | Allows to control how separate pages are saved when a document is exported to fixed page format. |
| set_PageSet(const System::SharedPtr<Aspose::Words::Saving::PageSet> &) | Sets the pages to render. Default is all the pages in the document. |
| static CreateSaveOptions(Aspose::Words::SaveFormat) | Creates a save options object of a class suitable for the specified save format. |
| static CreateSaveOptions(const System::String &) | Creates a save options object of a class suitable for the file extension specified in the given file name. |
| 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. |
| get_CustomTimeZoneInfo() const | Gets or sets custom local time zone used for date/time fields. |
| get_DefaultTemplate() const | Gets or sets path to default template (including filename). Default value for this property is empty string. |
| get_Dml3DEffectsRenderingMode() const | Gets or sets a value determining how 3D effects are rendered. |
| virtual get_DmlEffectsRenderingMode() | Gets or sets a value determining how DrawingML effects are rendered. |
| get_DmlRenderingMode() const | Gets or sets a value determining how DrawingML shapes are rendered. |
| get_ExportGeneratorName() const | When true, causes the name and version of Aspose.Words to be embedded into produced files. Default value is true. |
| get_ImlRenderingMode() const | Gets or sets a value determining how ink (InkML) objects are rendered. |
| 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. |
| get_PrettyFormat() const | When true, pretty formats output where applicable. Default value is false. |
| get_ProgressCallback() const | Called during saving a document and accepts data about saving progress. |
| virtual get_SaveFormat() | Specifies the format in which the document will be saved if this save options object is used. |
| 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. |
| get_UpdateAmbiguousTextFont() const | Determines whether the font attributes will be changed according to the character code being used. |
| get_UpdateCreatedTimeProperty() const | Gets or sets a value determining whether the CreatedTime property is updated before saving. Default value is false; |
| 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. |
| get_UpdateLastPrintedProperty() const | Gets or sets a value determining whether the LastPrinted property is updated before saving. |
| get_UpdateLastSavedTimeProperty() const | Gets or sets a value determining whether the LastSavedTime property is updated before saving. |
| get_UpdateOleControlImages() const | Gets a value determining whether OLE controls presentation image will be updated. |
| get_UseAntiAliasing() const | Gets or sets a value determining whether or not to use anti-aliasing for rendering. |
| get_UseHighQualityRendering() const | Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. |
| set_AllowEmbeddingPostScriptFonts(bool) | 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. |
| set_CustomTimeZoneInfo(const System::SharedPtr<System::TimeZoneInfo> &) | Sets custom local time zone used for date/time fields. |
| set_DefaultTemplate(const System::String &) | Sets path to default template (including filename). Default value for this property is empty string. |
| set_Dml3DEffectsRenderingMode(Aspose::Words::Saving::Dml3DEffectsRenderingMode) | Sets a value determining how 3D effects are rendered. |
| virtual set_DmlEffectsRenderingMode(Aspose::Words::Saving::DmlEffectsRenderingMode) | Sets a value determining how DrawingML effects are rendered. |
| set_DmlRenderingMode(Aspose::Words::Saving::DmlRenderingMode) | Sets a value determining how DrawingML shapes are rendered. |
| set_ExportGeneratorName(bool) | When true, causes the name and version of Aspose.Words to be embedded into produced files. Default value is true. |
| set_ImlRenderingMode(Aspose::Words::Saving::ImlRenderingMode) | Sets a value determining how ink (InkML) objects are rendered. |
| set_MemoryOptimization(bool) | Sets value determining if memory optimization should be performed before saving the document. Default value for this property is false. |
| set_PrettyFormat(bool) | When true, pretty formats output where applicable. Default value is false. |
| set_ProgressCallback(const System::SharedPtr<Aspose::Words::Saving::IDocumentSavingCallback> &) | Called during saving a document and accepts data about saving progress. |
| virtual set_SaveFormat(Aspose::Words::SaveFormat) | Specifies the format in which the document will be saved if this save options object is used. |
| set_TempFolder(const System::String &) | 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. |
| set_UpdateAmbiguousTextFont(bool) | Determines whether the font attributes will be changed according to the character code being used. |
| set_UpdateCreatedTimeProperty(bool) | Sets a value determining whether the CreatedTime property is updated before saving. Default value is false; |
| set_UpdateFields(bool) | 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. |
| set_UpdateLastPrintedProperty(bool) | Sets a value determining whether the LastPrinted property is updated before saving. |
| set_UpdateLastSavedTimeProperty(bool) | Sets a value determining whether the LastSavedTime property is updated before saving. |
| set_UpdateOleControlImages(bool) | Sets a value determining whether OLE controls presentation image will be updated. |
| set_UseAntiAliasing(bool) | Sets a value determining whether or not to use anti-aliasing for rendering. |
| set_UseHighQualityRendering(bool) | Sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. |
Examples
Shows how to render one page from a document to a JPEG image.
auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);
builder->Writeln(u"Page 1.");
builder->InsertBreak(BreakType::PageBreak);
builder->Writeln(u"Page 2.");
builder->InsertImage(get_ImageDir() + u"Logo.jpg");
builder->InsertBreak(BreakType::PageBreak);
builder->Writeln(u"Page 3.");
// Create an "ImageSaveOptions" object which we can pass to the document's "Save" method
// to modify the way in which that method renders the document into an image.
auto options = System::MakeObject<Aspose::Words::Saving::ImageSaveOptions>(SaveFormat::Jpeg);
// Set the "PageSet" to "1" to select the second page via
// the zero-based index to start rendering the document from.
options->set_PageSet(System::MakeObject<Aspose::Words::Saving::PageSet>(1));
// When we save the document to the JPEG format, Aspose.Words only renders one page.
// This image will contain one page starting from page two,
// which will just be the second page of the original document.
doc->Save(get_ArtifactsDir() + u"ImageSaveOptions.OnePage.jpg", options);
Shows how to render every page of a document to a separate TIFF image.
auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);
builder->Writeln(u"Page 1.");
builder->InsertBreak(BreakType::PageBreak);
builder->Writeln(u"Page 2.");
builder->InsertImage(get_ImageDir() + u"Logo.jpg");
builder->InsertBreak(BreakType::PageBreak);
builder->Writeln(u"Page 3.");
// Create an "ImageSaveOptions" object which we can pass to the document's "Save" method
// to modify the way in which that method renders the document into an image.
auto options = System::MakeObject<Aspose::Words::Saving::ImageSaveOptions>(SaveFormat::Tiff);
for (int32_t i = 0; i < doc->get_PageCount(); i++)
{
// Set the "PageSet" property to the number of the first page from
// which to start rendering the document from.
options->set_PageSet(System::MakeObject<Aspose::Words::Saving::PageSet>(i));
// Export page at 2325x5325 pixels and 600 dpi.
options->set_Resolution(600);
options->set_ImageSize(System::Drawing::Size(2325, 5325));
doc->Save(get_ArtifactsDir() + System::String::Format(u"ImageSaveOptions.PageByPage.{0}.tiff", i + 1), options);
}
See Also
- Class SaveOptions
- Namespace Aspose::Words::Saving
- Library Aspose.Words for C++