Hi,
Is there no way to display a PDF using Aspose.pdf library?
There is a need for a PDF viewer on Android OS & the existing solutions such as Qoppa or MuPDF are not dev friendly by any means.
Is adding a viewer on your future release agenda?
Thank you,
Sireesha
Hi Sireesha,
Hi Sireesha,
//open
document<o:p></o:p>
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("input.pdf");
// create stream object to save the output image
java.io.OutputStream imageStream = new java.io.FileOutputStream("Converted_Image.jpg");
//create JPEG device with specified attributes
//Quality [0-100], 100 is Maximum
//create Resolution object
com.aspose.pdf.devices.Resolution resolution = new com.aspose.pdf.devices.Resolution(300);
//create JpegDevice object where second argument indicates the quality of resultant image
com.aspose.pdf.devices.JpegDevice jpegDevice = new com.aspose.pdf.devices.JpegDevice(resolution, 100);
//convert a particular page and save the image to stream
jpegDevice.process(pdfDocument.getPages().get_Item(1), imageStream);
//close the stream
imageStream.close();