PDF Compression

Posted by: isemkiv on 17 May 2022, 4:33 pm EST

  • Posted 17 May 2022, 4:33 pm EST

    My company considering to buying GrapeCity Documents for PDF library.
    One of the feature we need is the compression of the pdf files.

    I made quick test. І wrote code :

    var pdfDocument = new GcPdfDocument();

    pdfDocument.PdfVersion = "1.6";
    pdfDocument.ImageOptions.CompressColors = true;
    pdfDocument.ImageOptions.JpegQuality = 1;
    pdfDocument.ImageOptions.Format = ImageOptions.ImageFormat.Auto;
    pdfDocument.CompressionLevel = System.IO.Compression.CompressionLevel.Optimal;
    pdfDocument.FontEmbedMode = FontEmbedMode.NotEmbed;

    pdfDocument.Save(outputStream, SaveMode.Linearized);

    .. and try compress different files. The size of the file after "compression" is the same or even greater.

    Can You help me with this? There are possibility to edit the embedded images? I'm thinking about the resolution's change or/and convert image to greyscale.

    Can I copy only images and texts from one pdf to another without attachments, notes and so on?
  • Replied 17 May 2022, 8:59 pm EST

    Duplicate : https://www.grapecity.com/forums/documents-pdf/pdf-compression
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels