ImageGear .NET v24.12 - Updated
SaveDocument Method




ImageGear24.Core Assembly > ImageGear.Formats Namespace > ImGearFileFormats Class : SaveDocument Method
ImageGear document to save.
NET stream to write an image to.
The number of a start page in the image file where document pages are saved.
Specifies how new pages should be saved to an image; replace pages, insert pages, append pages, or overwrite the entire image.
The format to save new pages in. This is a combination of a file format and a compression (e.g., TIFF-G4).
Additional saving options such as thumbnail dimensions.
Saves document to an image.
Syntax
'Declaration
 
Public Shared Sub SaveDocument( _
   ByVal document As ImGearDocument, _
   ByVal stream As Stream, _
   ByVal startPageInFile As Integer, _
   ByVal mode As ImGearSavingModes, _
   ByVal saveFormat As ImGearSavingFormats, _
   ByVal saveOptions As ImGearSaveOptions _
) 
'Usage
 
Dim document As ImGearDocument
Dim stream As Stream
Dim startPageInFile As Integer
Dim mode As ImGearSavingModes
Dim saveFormat As ImGearSavingFormats
Dim saveOptions As ImGearSaveOptions
 
ImGearFileFormats.SaveDocument(document, stream, startPageInFile, mode, saveFormat, saveOptions)
public static void SaveDocument( 
   ImGearDocument document,
   Stream stream,
   int startPageInFile,
   ImGearSavingModes mode,
   ImGearSavingFormats saveFormat,
   ImGearSaveOptions saveOptions
)
public: static void SaveDocument( 
   ImGearDocument* document,
   Stream* stream,
   int startPageInFile,
   ImGearSavingModes mode,
   ImGearSavingFormats saveFormat,
   ImGearSaveOptions* saveOptions
) 
public:
static void SaveDocument( 
   ImGearDocument^ document,
   Stream^ stream,
   int startPageInFile,
   ImGearSavingModes mode,
   ImGearSavingFormats saveFormat,
   ImGearSaveOptions^ saveOptions
) 

Parameters

document
ImageGear document to save.
stream
NET stream to write an image to.
startPageInFile
The number of a start page in the image file where document pages are saved.
mode
Specifies how new pages should be saved to an image; replace pages, insert pages, append pages, or overwrite the entire image.
saveFormat
The format to save new pages in. This is a combination of a file format and a compression (e.g., TIFF-G4).
saveOptions
Additional saving options such as thumbnail dimensions.
Remarks
This method allows you to save the entire document in a single call. Both page pixel data and page metadata are saved. If a new image is created (or overwritten), document level metadata is saved as well, otherwise, it is ignored. If the document size is close to 2GB, an exception of System.OutOfMemoryException will be thrown.
See Also

Reference

ImGearFileFormats Class
ImGearFileFormats Members
ImGearDocument Class
ImGearPage Class
ImGearSavingModes Enumeration
ImGearSavingFormats Enumeration
ImGearSaveOptions Class