ImageGear v26.0 - Updated
SaveCompressed(Stream,ImGearCompressOptions) Method




ImageGear.Formats.Pdf Assembly > ImageGear.Formats.PDF Namespace > ImGearPDFDocument Class > SaveCompressed Method : SaveCompressed(Stream,ImGearCompressOptions) Method
Stream object to save to. Only FileStream and MemoryStream are currently supported.
Options used for compressing PDF document.
Save highly-compressed PDF document to a System.IO.Stream object.
Syntax
'Declaration
 
Public Overloads Sub SaveCompressed( _
   ByVal stream As Stream, _
   ByVal compressOptions As ImGearCompressOptions _
) 
'Usage
 
Dim instance As ImGearPDFDocument
Dim stream As Stream
Dim compressOptions As ImGearCompressOptions
 
instance.SaveCompressed(stream, compressOptions)
public void SaveCompressed( 
   Stream stream,
   ImGearCompressOptions compressOptions
)
public: void SaveCompressed( 
   Stream* stream,
   ImGearCompressOptions* compressOptions
) 
public:
void SaveCompressed( 
   Stream^ stream,
   ImGearCompressOptions^ compressOptions
) 

Parameters

stream
Stream object to save to. Only FileStream and MemoryStream are currently supported.
compressOptions
Options used for compressing PDF document.
Exceptions
ExceptionDescription
Thrown when stream is not writable.
Remarks

ImageGear improves the overall size of saved PDF documents by reducing or removing data structures in the PDF document, specifically:

WARNING: Re-compressing Images with JBIG2 will invalidate PDF/X compliant documents.

WARNING: Removing embedded Standard Type 1 Fonts will invalidate PDF/X compliant documents.

WARNING: Removing embedded Standard Type 1 Fonts will invalidate PDF/A compliant documents when visible text is affected.

File size improvements will vary with each PDF file. In some cases, file size reduction is dramatic. Re-saving an optimized PDF file is not expected to further reduce its size. If saving a compressed PDF would result in an increase in file size, the original document is saved instead.

Example
See Also

Reference

ImGearPDFDocument Class
ImGearPDFDocument Members
Overload List

Is this page helpful?
Yes No
Thanks for your feedback.