I am creating a pdf with android itext lib. it shows complete data in single page. i want to split the single page to A4 size multiple pages with page number on bottom.
private void callDocument(File file, Bitmap screen) throws Exception {
try {
com.itextpdf.text.Rectangle pagesize = new com.itextpdf.text.Rectangle(webview.getWidth(), webview.getHeight());
Document document = new Document(pagesize, 0f, 0f, 0f, 0f);
PdfWriter.getInstance(document, new FileOutputStream(file));
document.open();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
screen.compress(Bitmap.CompressFormat.JPEG, 100, stream);
byte[] byteArray = stream.toByteArray();
addImage(document, byteArray);
document.close();
sendEmailToGuest();
} catch (Exception e) {
e.printStackTrace();
}
}
want to split single page to the multiple pages