Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Jul 11, 2024 2:13 pm

Hello,

I use Spire DOC since 2021, and i have the 9.4.12 version. In my project y generate a docx file and i convert this file in pdf.
Problem the size of the pdf is very important so i want to compress it.

So this morning i have bought Spire.PDF.

Question : Are these two versions compatible? (Spire.DOC v9.4.1.2 and the last release of Spire.PDF)

Thanks for your response

vincentjam
 
Posts: 15
Joined: Tue Apr 13, 2021 10:08 am

Fri Jul 12, 2024 2:31 am

Hi,

Thank you for purchasing our product.
We apologize that Spire.Doc 9.4.12 is not compatible with Spire.PDF. We recommend upgrading to the latest version of Spire.Doc, as our new version introduces new features. Additionally, the current version of Spire.Doc is fully compatible with other Spire products. If you have any further questions, please feel free to contact us anytime.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Fri Jul 12, 2024 6:35 am

Hi,

I'm very surprised and disappointed

Is it possible to have an upgrade price for Spire.DOC ?

Or maybe an old version of Spire.PDF, could be compatible ?

Thanks

vincentjam
 
Posts: 15
Joined: Tue Apr 13, 2021 10:08 am

Fri Jul 12, 2024 8:52 am

Hi,

I apologize for any inconvenience caused.
Our previous products were not mutually compatible, and compatibility issues were resolved using the Spire.Office integration package. If you wish to use an older version of Spire.PDF, we recommend downloading an older version of Spire.Office (you can try Spire.Office 6.4.2), which includes both Spire.Doc and Spire.PDF.
Regarding the upgrade price, your company is eligible for a 25% discount to renew Spire.Doc Pro Edition Developer Small Business at $749.25 ($999*0.75). Please get back to us for the coupon code when you're ready to make the renewal.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Fri Jul 12, 2024 10:36 am

Is il possible to compress PDF file with Spire Office 6.4.2 ?

vincentjam
 
Posts: 15
Joined: Tue Apr 13, 2021 10:08 am

Mon Jul 15, 2024 3:44 am

Hello,

Thank you for your further inquiry and sorry to reply late for weekend.
Yes, Spire Office 6.4.2 can compress PDF files. The way we compress PDF files differs between our new version and the old version. I'm attaching both sets of code for your reference.
If there's any issue, please provide your PDF file for our further investigation. Thanks in advance!

New Version Compression Code:

Code: Select all
        PdfCompressor compressor = new PdfCompressor(PdfFileName);
        TextCompressionOptions textCompression = compressor.Options.TextCompressionOptions;
        textCompression.CompressFonts = true;
        textCompression.UnembedFonts = true;
        ImageCompressionOptions imageCompression = compressor.Options.ImageCompressionOptions;
        imageCompression.ImageQuality = ImageQuality.Medium;
        imageCompression.ResizeImages = true;
        imageCompression.CompressImage= true;
        compressor.CompressToFile(outputImagePath);


Old Version Compression Code:

Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"CompressDocument.pdf");
//Compress the content in document
CompressContent(doc);

//Compress the images in document
CompressImage(doc);

//Save the document
doc.SaveToFile("CompressDocument_result.pdf");
static void CompressContent(PdfDocument doc)
{
    //Disable the incremental update
    doc.FileInfo.IncrementalUpdate = false;

    //Set the compression level to best
    doc.CompressionLevel = PdfCompressionLevel.Best;
}

static void CompressImage(PdfDocument doc)
{
    //Disable the incremental update
    doc.FileInfo.IncrementalUpdate = false;
   
    //Traverse all pages
    foreach (PdfPageBase page in doc.Pages)
    {
        if (page.ExtractImages() != null)
        {
            PdfImageInfo[] infos = page.ImagesInfo;
            for (int i = 0; i < infos.Length; i++)
            {
                page.TryCompressImage(i);
            }
        }
    }
}


Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Tue Jul 16, 2024 11:44 am

Hello,

Could you send me the coupon to update my Spire.doc Component ?

Yhanks

vincentjam
 
Posts: 15
Joined: Tue Apr 13, 2021 10:08 am

Wed Jul 17, 2024 2:59 am

Hello,

Please kindly note that our sales colleague will be sending you the coupon via email shortly. We kindly request that you keep an eye on your inbox for its arrival.
In case you encounter any technical queries or concerns, we would be delighted to assist you. Please do not hesitate to leave a message on our forum at your earliest convenience.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Return to Spire.PDF