Hello everyone.
I am using itextpdf to create a pdf, and everything works fine.
In addition to this I need to convert the image to bitmap, so that it is returned in the function.
I appreciate all the support
I am using itextpdf to create a pdf, and everything works fine.
In addition to this I need to convert the image to bitmap, so that it is returned in the function.
B4X:
public void draw128(String filename,String ruta) throws IOException, DocumentException {
String configFilePath = ruta;
Document document = new Document(new Rectangle(340, 842));
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(configFilePath + filename));
document.open();
PdfContentByte cb = writer.getDirectContent();
Barcode128 uccEan128 = new Barcode128();
uccEan128.setCodeType(Barcode.CODE128_UCC);
uccEan128.setCode("(01)00000090311314(10)ABC123(15)060916");
Image imagetoConvert = uccEan128.createImageWithBarcode(cb, BaseColor.BLACK,BaseColor.BLACK);
document.add(imagetoConvert);
document.close(); 'The pdf file is successfully created
// HOW CONVERT imagetoConvert to Bitmap?
// Bitmap bitmaptoReturn = ???????
// return bitmaptoReturn;
}
I appreciate all the support