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.

Tue Nov 25, 2025 2:38 pm

Hello,
I am testing a feature that converts images to PDF. I am using it in a Spring Boot project with Maven, and I am using Java version 1.8. When generating PDF files with the code below, I am encountering an "evaluation warning." I can provide the license key file via email for your review.
Code: Select all
public class Main {
    public static void main(String[] args) throws Exception {
        LicenseProvider.setLicenseKey("keyString"); // key string in license xml file. com.spire.pdf.license.LicenseProvider class.

        PdfDocument pdfDocument = new PdfDocument();

        pdfDocument.getPageSettings().setMargins(20);

        for (int i = 1; i <= 4; i++) {
            PdfPageBase page = pdfDocument.getPages().add();
            BufferedImage image = ImageIO.read(Files.newInputStream(Paths.get( + i + ".png")));

            int width = image.getWidth();
            int height = image.getHeight();

            PdfImage pdfImage;

            if (width > page.getCanvas().getClientSize().getWidth()) {
                //Resize the image to make it to fit to the page width
                int widthFitRate = width / (int) page.getCanvas().getClientSize().getWidth();
                int targetWidth = width / widthFitRate;
                int targetHeight = height / widthFitRate;
                BufferedImage scaledImage = Scalr.resize(image, Scalr.Method.QUALITY, targetWidth, targetHeight);

                //Load the scaled image to the PdfImage object
                pdfImage = PdfImage.fromImage(scaledImage);

            } else {
                //Load the original image to the PdfImage object
                pdfImage = PdfImage.fromImage(image);
            }

            //Draw image at (0, 0)
            page.getCanvas().drawImage(pdfImage, 0, 0, pdfImage.getWidth(), pdfImage.getHeight());
        }
        //Save to file
        pdfDocument.saveToFile("AddImage.pdf");
    }
}

Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<License Key="" Version="1.3">
    <Type>Runtime</Type>
    <Username>MSLINK SOLUTION</Username>
    <Email></Email>
    <Organization></Organization>
    <LicensedDate>2022-12-23T00:00:00Z</LicensedDate>
    <ExpiredDate>2023-12-23T00:00:00Z</ExpiredDate>
    <Products>
        <Product>
            <Name>Spire.PDF for JAVA</Name>
            <Version>8.11</Version>
            <Subscription>
                <Name>Developer OEM Subscription</Name>
                <NumberOfPermittedDeveloper></NumberOfPermittedDeveloper>
                <NumberOfPermittedSite></NumberOfPermittedSite>
            </Subscription>
        </Product>
    </Products>
    <Issuer>
        <Name>e-iceblue</Name>
        <Email>[email protected]</Email>
        <Url>http://www.e-iceblue.com</Url>
    </Issuer>
</License>

Code: Select all
<!--pom.xml dependency-->
<dependency>
    <groupId>e-iceblue</groupId>
    <artifactId>spire.pdf</artifactId>
    <version>11.10.3</version>
</dependency>

mslk_khkim
 
Posts: 4
Joined: Tue Nov 25, 2025 2:19 pm

Wed Nov 26, 2025 1:42 am

Hello,

Thank you for your post,
Your license information ("<ExpiredDate>2023-12-23T00:00:00 Z</ExpiredDate>") indicates that its expiration date is 2023/12/23, which means that this license can only be valid for Spire.PDF for Java versions released before 2023/12/23. It is not valid for versions released after 2023/12/23 and the current latest version (spire. pdf 11.10.3). You need to update new license to use the latest version.
Regarding the version released news, please refer to:
https://www.e-iceblue.com/news/spire-pdf-java.html
Regarding the upgrade price, please refer to:
https://www.e-iceblue.com/Buy/Spire.PDF-java.html
If you have any other questions, you can contact [email protected].

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Wed Nov 26, 2025 3:55 am

Thank you for your response.
Then where can I find the library version that will work with my license?
It appears that only the latest version is available on the website.

mslk_khkim
 
Posts: 4
Joined: Tue Nov 25, 2025 2:19 pm

Wed Nov 26, 2025 4:02 am

oh, I find library file.

Thank you for your help.

mslk_khkim
 
Posts: 4
Joined: Tue Nov 25, 2025 2:19 pm

Wed Nov 26, 2025 9:14 am

Hello,

Thanks for your quick reply.
If you have other questions, please do not hesitate to contact us. Wish you all the best!

Sincerely,
Lisa.li
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Sat Dec 06, 2025 7:04 am

I noticed something that might be causing the issue-
It looks like you're using the 11.10.3 dependency in your pom.xml, but the license XML you shared shows the product version as 8.11. A version mismatch like that is usually the reason the license doesn't seem to apply correctly and you get the evaluation warning.
Try either-
1) Matching your Spire.PDF dependency version to the version on your license (8.11 in this case).
2) Or, if you want to use the latest version (11.10.3), you'll need to contact their sales/support to get an updated license key that covers it.

Skylar31
 
Posts: 15
Joined: Mon Oct 13, 2025 8:37 am

Mon Dec 08, 2025 1:15 am

Hello Skylar31,

Thank you for sharing, what you mentioned is correct.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF