Hi,
I am looking at getting a developer SDK license for the PDF Compressor, I am unable to work out how test this in my Application. i use C#, are you able to help me out or point me in the right direction.
Customer
------------------------------------------
Thanks for your message, you can download and purchase PDF Compressor SDK from following web page,
https://www.verydoc.com/pdfcompressor.html
https://www.verydoc.com/dl2.php/pdfcompressor_sdk.zip
this pdfcompressor_sdk.zip package is contain C#, VB and VB.NET examples, you can launch a CMD window by administrator privilege, and run following command line to register PDFCompressCom.exe COM into your system,
PDFCompressCom.exe /regserver
then you can compile and run C# project to test PDF Compression function.
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);
}
}
}
See Also: