Hi
I am trying to convert BMP, JPEG ,tiff and gif files to pdf , but I could not able to add pdf save option to it.
my expectation is need to convert BMP, JPEG ,tiff and gif to pdf A-2 and save this pdfa-2 as a stream.
Can you help us providing code in Aspose java.
Please find my current code :
com.aspose.imaging.Image image = com.aspose.imaging.Image.load(docStream);
try {
PdfOptions pdfOptions = new PdfOptions();
double width = image.getWidth() * (72 / ((RasterImage) image).getHorizontalResolution());
double height = image.getHeight() * (72 / ((RasterImage) image).getVerticalResolution());
System.out.println(width);
System.out.println(height);
pdfOptions.setPageSize(new SizeF((int) width, (int) height));
image.save(stream, pdfOptions);
inputStream = new ByteArrayInputStream(stream.toByteArray());
Thanks
Siva