0
첫 페이지의 썸네일을 생성하고 싶습니다. 다음 페이지에서 생성하려고 시도했는데 좋은 해상도로 이미지를 인쇄 할 수 없으며 확대/축소시 이미지가 잘 보입니다. 처음 몇 개의 열에 대해 엄지 손톱을 인쇄 할 수있는 옵션이 있어도 괜찮을 것입니다. 제발 제안 해주세요.Aspose : 첫 페이지의 썸네일 생성
Workbook book = new Workbook(new ByteArrayInputStream(documentData));
// Define ImageOrPrintOptions
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
// Set the vertical and horizontal resolution
imgOptions.setVerticalResolution(200);
imgOptions.setHorizontalResolution(200);
// Set the image's format
imgOptions.setImageFormat(ImageFormat.getJpeg());
// One page per sheet is enabled
imgOptions.setOnePagePerSheet(true);
// Get the first worksheet
Worksheet sheet = book.getWorksheets().get(0);
// Render the sheet with respect to specified image/print options
SheetRender sr = new SheetRender(sheet, imgOptions);
// Render the image for the sheet
sr.toImage(0, "mythumb.jpg");
// Creating Thumbnail
java.awt.Image img = ImageIO.read(new File("mythumb.jpg")).getScaledInstance(100, 100, BufferedImage.SCALE_SMOOTH);
BufferedImage img1 = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
img1.createGraphics().drawImage(
ImageIO.read(new File("mythumb.jpg")).getScaledInstance(100, 100, img.SCALE_SMOOTH), 0, 0, null);
return img1;