Hi Sandeep,
Hi,
I have used your pdf document and library. I am attaching activity file, sample pdf file and exception screen on mobile. Please rectify this.
Regards
Sandeep kaushal
Hi Sandeep,
Hi Sandeep,
Thanks for your patience.
I have tested the scenario using Aspose.Pdf for Android 1.4.0 over Windows 7 (x64) and I am unable to notice any exception when converting my.pdf file to Image format. However, I have observed that the resultant image is blank. For the sake of correction, I have logged this problem as PDFANDROID-268 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of the correction. Please be patient and spare us little time. We are sorry for this inconvenience.
I have used the following code snippet for the conversion process.
String outputPath = Environment.getExternalStorageDirectory().getPath();
com.aspose.pdf.Document pdfDocument1 = new com.aspose.pdf.Document(Environment.getExternalStorageDirectory().getPath() + "/my.pdf");
// Loop through all the pages of PDF file
for (int pageCount = 1; pageCount <= pdfDocument1.getPages().size(); pageCount++) {
// Create stream object to save the output image
java.io.OutputStream imageStream = new java.io.FileOutputStream(Environment.getExternalStorageDirectory().getPath()+ "/my_Converted_Image" + pageCount + ".jpg");
// 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(pdfDocument1.getPages().get_Item(pageCount), imageStream);
// Close the stream
imageStream.close();
}
Hi,
Please provide me complete source code and API.
Hi,
The same issue I am also facing giving empty image while converting from pdf to image.
sandeepkaushal:
Please provide me complete source code and API.
Hi,sandeepkaushal:
The same issue I am also facing giving empty image while converting from pdf to image.