orichisonic

Hi there, alternatively, you could try Spire.PDF library to draw Code128 bar code ane many other types on your PDF document. Check the link below for your reference.

https://www.e-iceblue.com/Tutorials/JAVA/Spire.PDF-for-JAVA/Program-Guide/Text/Draw-Barcode-in-PDF-in-Java.html

orichisonic

Hi, it is not possible to read an image from a cell as a cell property. If you only want to read the images from a worksheet and reposition them on a specific cell, refer to the following code snippet. This requires another free Excel API instead of POI.

import com.spire.xls.*;

public class ChangeImagePosition {

    public static void main(String[] args) {

        //Create a Workbook object
        Workbook wb= new Workbook();

        //Load an Excel file
        wb.loadFromFile("C:\\Users\\Administrator\\Desktop\\images.xlsx");

        //Get the first image
        ExcelPicture excelPicture = wb.getWorksheets().get(0).getPictures().get(0);

        //Place the image on a specific row and column
        excelPicture.setTopRow(1);
        excelPicture.setLeftColumn(2);

        //Save to file
        wb.saveToFile("output/ChangePicPosition.xlsx",ExcelVersion.Version2016);
    }
}

orichisonic