I am searching for a library, sdk whatever, which converts a pdf (from a link) to an image, and then I want to share this image without leaving any trails (random png images left of the conversion or a downloaded pdf file somewhere). Has anyone any ideas on what and how I should do this?
Thanks in advance.
If you open pdf into webview then follow this step
WebView pdfWebView;
Bitmap pdfBitMap;
pdfWebView.buildDrawingCache();
pdfBitMap = pdfWebView.getDrawingCache();
Related
in my app I capture a photo using intent MediaStore.ACTION_IMAGE_CAPTURE and I save image into external storage that is private to my app. I also save the path to taken picture.
In next step I would like to crop 3 pictures from this photo but I cannot figure out how to do it. I found this article Crop an Image by passing the image file path in Android but the answer uses com.android.camera.action.CROP, which is often not supported. I would like to crop it like this
Bitmap bmp=BitmapFactory.decodeResource(getResources(), R.drawable.xyz);
resizedbitmap1=Bitmap.createBitmap(bmp, 0,0,yourwidth, yourheight);
but I need to crop picture according to user selection. Can anyone help me with this? I am pretty stuck here.
So I ended up using some third party library for cropping pictures. I recommend you to do the same. You will find plenty of them on github, choose according to your preferences.
This is a different situation. I want to load a image file which has stored with different extension like 'photo.xyz' instead of 'photo.jpg or photo.png' using Picasso. to avoid image from gallery i am storing image like this. Please help me is there any option to show like this.
Neither Picasso nor Android (which does the actual image decoding) cares what the file name is. It can be anything. The type of the image is always determined from the first few bytes of the actual image data.
As a small workaround you can programmatically put .nomedia file into your app folder to prevent images to be cached by mediaserver and displayed in a Gallery app.
I want to display some text and image in webview. FOr this i am using a template html string.
Within this template i want to replace the {image} with the path for an image in drawable folder
i tried
str = str.replace("{image}","res/drawable-hdpi/about.png" )
but the image is not coming.
Is this the right way to give path.
Or what is the right solution
Thanks a lot for your time and help
I use something like this to download image from web. The image is normally displays on web. Here is the link of the Image. It downloads on Android device successfully but not displaying on an ImageView control. And this Image downloads and showing successfully. What can be causes some specific images can't be showen by Android ImageView control?
Android API Level: 7
Thank you!
This image cannot be displayed in Android Browser:
http://www.mekanist.net/img/places/75/faros_20110909125521412.jpg
This problem may be caused by unsupported details of jpeg image format.
You should consider to investigate the thumb-maker code.
Drawable img = Drawable.createFromPath(filePath);
filePath is the image you downloaded on your phone sdcard absolute path
ImageView ivPic=(ImageView) findViewById(R.id.ivPic);;
ivPic.setImageDrawable(img);
Is there any possible way to convert a pdf into image and show them on a image view?
PDF isn't made up of images, they're vectors.
Tcouple open-source java PDF to Image converters though like:
http://www.jpedal.org/
http://code.google.com/p/pdfonejava/