// Create a new workbook Workbook workbook = new Workbook(); IWorksheet sheet = workbook.getWorksheets().get(0); InputStream stream = this.getResourceStream("logo.png"); IShape picture = null; try { picture = sheet.getShapes().addPicture(stream, ImageType.PNG, 20, 20, 395, 60); } catch (IOException ioe) { } sheet.getRange("B2:D4").setValue("Text"); sheet.getPageSetup().setPrintGridlines(true); //Set scaling. sheet.getPageSetup().setZoom(200); // Save to a pdf file workbook.save("ConfigureScaling.pdf");