Locale.setDefault(locale1);
//
Added document
Document
doc = new com.aspose.pdf.Document();
doc.getPageInfo().isLandscape(true);
Table
table = new Table();
Page
curPage = doc.getPages().add();
curPage.getParagraphs().add(table);
table.setColumnWidths("50
100");
Row
row = table.getRows().add();
Cell
cell1 = row.getCells().add();
cell1.getParagraphs().add(new
TextFragment("Hai"));
Cell
cell2 = row.getCells().add();
Image
image = new Image();
image.setImageStream(new
FileInputStream("scheduler-logo.jpg"));
cell2.getParagraphs().add(image);
doc.save(
new BufferedOutputStream(new FileOutputStream("images.pdf")));
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
doc.save(baos, new PdfSaveOptions().getSaveFormat());