Enable the CompressImages property and assign the ImageQuality provided in the PdfCompressionOptions class to compress every picture in a PDF file.
Activate the OptimizeFont property to improve the embedded fonts in an existing PDF file. Using this method, all the unnecessary glyph data is removed, reducing the font file size.
Enable the RemoveMetadata property to remove metadata to shrink the PDF's size.
By optimizing the page's contents, all uncompressed text will be compressed and all unneeded commented lines, white spaces, and end-of-line characters will be converted to spaces.
Using the PdfCompressionLevel enum, you choose the compression level for the document. Compression levels like best, normal, none, etcand others can be set.