How to compress color images, grayscale images and monochrome images in PDF files?

Hello,

Our company is interested in purchasing an API that would allow us to create executable letting us compress PDF images. When I investigated the APIs offered, I didn't notice this option, but we do like your PDF compressor for our purposes, so I'm hoping there's something I missed.

Customer
------------------------------------------------
Thanks for your message, yes, we have PDF Compressor SDK product, you can download and purchase it from following web page,

http://www.verydoc.com/pdfcompressor.html
http://www.verydoc.com/dl2.php/pdfcompressor_sdk.zip

You can run "install.vbs" to install PDFCompressCom.exe into your system first, then you can use following C# code to compress PDF files easily,

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using VeryPDF;

using System.IO;

 

namespace WindowsFormsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            string appPath = Path.GetDirectoryName(Application.ExecutablePath);

            string strPDFFile = appPath + "\\sample\\test-color-image.pdf";

            string strOutFile = appPath + "\\sample\\test-color-image_out.pdf";

            string strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";

 

            string strCmd = "-ci jpx -cidown -cidownres 150 -gi jpx -gidown
                      -gidownres 150 -mi jbig2 -midown -midownres 150 "

                      + strLicenseKey +
" \"" + strPDFFile + "\" \""
                      + strOutFile +
"\"";

 

            System.Type VeryPDFType = System.Type.GetTypeFromProgID
                      (
"VeryPDF.PDFCompressCom");

            VeryPDF.PDFCompressCom VeryPDFCom = (VeryPDF.PDFCompressCom)
                      System.
Activator.CreateInstance(VeryPDFType);

            string strReturn = VeryPDFCom.PDFCompressor(strCmd);

            MessageBox.Show(strReturn);

        }

    }

}

 

Or you can use following VB.NET source code to compress image files in PDF file,

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using VeryPDF;

using System.IO;

 

namespace WindowsFormsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            string appPath = Path.GetDirectoryName(Application.ExecutablePath);

            string strPDFFile = appPath + "\\sample\\test-color-image.pdf";

            string strOutFile = appPath + "\\sample\\test-color-image_out.pdf";

            string strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";

 

            string strCmd = "-ci jpx -cidown -cidownres 150 -gi jpx -gidown
                   -gidownres 150 -mi jbig2 -midown -midownres 150 "

                   + strLicenseKey +
" \"" + strPDFFile + "\" \"" + strOutFile
                   +
"\"";

 

            System.Type VeryPDFType = System.Type.GetTypeFromProgID
                   (
"VeryPDF.PDFCompressCom");

            VeryPDF.PDFCompressCom VeryPDFCom = (VeryPDF.PDFCompressCom)
                   System.
Activator.CreateInstance(VeryPDFType);

            string strReturn = VeryPDFCom.PDFCompressor(strCmd);

            MessageBox.Show(strReturn);

        }

    }

}

 

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!