// Create a new workbook Workbook workbook = new Workbook(); // Open an excel file InputStream fileStream = this.getResourceStream("xlsx/To_Do_List.xlsx"); workbook.open(fileStream); IWorksheet worksheet = workbook.getWorksheets().get(0); // Set a background image for worksheet InputStream stream = this.getResourceStream("AcmeLogo.png"); // Add a background picture for the worksheet, and the background picture will be rendered into the destination rectangle[10, 10, 500, 370]. IBackgroundPicture picture = null; try { picture = worksheet.getBackgroundPictures().addPictureInPixel(stream, ImageType.PNG, 10, 10, 500, 370); } catch (IOException e) { // Log ignored error of your code // log.debug(e.getMessage()); } // The background picture will be resized to fill the destination dimensions. picture.setBackgroundImageLayout(ImageLayout.Tile); // Sets the transparency of the background pictures. picture.setTransparency(0.5); // Save to a pdf file workbook.save("SaveBackgroundPicturesToPDF.pdf");