Posted by a ceTe Software moderator
Hello,
Yes, you can achieve this for the JPG images also without any problem. But it is not possible to convert the JPG images into PDF document directly, you will have to add the JPG image to a page of the PDF document. You can use the image byte array data for this. Following is some sample code for this.
Document document = new Document();
Page page = new Page();
Image imageJPG = new Image(byteArrayJPG, 0, 0, 0.24f)
page.getElements().add(imageJPG);
document.getPages().add(page);
document.drawToWeb(httpReq,httpRes,outStream,fileName);
Thanks,
ceTe Software Support Team.