Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 936 Bytes

File metadata and controls

18 lines (11 loc) · 936 Bytes

Recompress images before adding them to PDF in C# and VB.NET

This sample shows how to change the compression scheme of an image while adding it to a PDF document.

Description

To recompress an image or a frame of an image before adding it to a PDF document:

  • Open the image using the PdfDocument.OpenImage method.
  • Setup compression options for all or selected frames.

Depending on the options, the library will decompress some frames and then compress them again before adding them to the document.

You can compress images using Flate, Jpeg and CCITT compression schemes. It is possible to decompress an image completely, too.

The library can also repack the images, already added to the document.

See also