Skip to main content
Inspiring
November 20, 2024
Question

Java error when trying to use iText to add image to PDF

  • November 20, 2024
  • 1 reply
  • 432 views

Hello! I am getting a Java error when attempting to use the iText library to add an image to a PDF. Orr front-line staff uses Topaz signature pads to capture signatures. These files are then saved as GIFs.

 

Our back-end office opens these applications, which are PDFs with form fields. The iText library takes the images and places them on the PDF.

 

Attached is the error I'm getting, and also a code snippet.

 

This runs fine in our dev environment, which is identical to our production. I get this error on production. Both servers are running Coldfusion 2023 update 11. Same Java version 17.0.6, etc. I'm at a loss as to why it would work on one but not the other. I'm not sure what I should be looking for. 

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    November 22, 2024

    I suspect a local environmental issue. The exceptions suggest that the relevant Jar files may be absent from the classpath. Make sure they are on the classpath, for example, by verifying that they are present in the lib directory.

     

    Also make sure all the relevant packages are installed. For example, check by opening the ColdFusion Administrator, and navigating to Package Manager > Available Packages.

     

    Let us know what you find.