Brother, thank you for the explanation I did everything, but when I reduce the size of the image it loses clarity and becomes blurry Is there a way to clarify the picture?
Hi I followed your code and I got this error attempt to invoke virtual method 'int android.graphics.bitmap.getwidth()' on a null object reference, is there any way to solve it ? Thank you.
Assalamualaikum, Please help me to reduce file size and dimensions of the file. Because when i create pdf of large image then the pdf make approx 10-12mb as image. So please help me
@@ZeeshanAli-dk9wd The error is because you do not have the permission declared in the code to choose the photo one solution is go settings Applications search your app storage and give permission
bro i am having a problem the pdf file is not created neither the image was inserted in this app and there is no error in android studio please kindly solve my this error
The error is because you do not have the permission declared in the code to choose the photo one solution is go settings Applications search your app storage and give permission
Brother, thank you for the explanation
I did everything, but when I reduce the size of the image it loses clarity and becomes blurry
Is there a way to clarify the picture?
can you convert pdfdocument to bitmap.?
Thank you very much for you help... from Part1 and Part2.
Hi I followed your code and I got this error attempt to invoke virtual method 'int android.graphics.bitmap.getwidth()' on a null object reference, is there any way to solve it ? Thank you.
Check if u have initialized bitmap or not
Programming Experts Yes I follow exactly your code but it crashed when I select a photo from gallery.
same error i faced
Same error
Assalamualaikum,
Please help me to reduce file size and dimensions of the file.
Because when i create pdf of large image then the pdf make approx 10-12mb as image.
So please help me
Please help me
My image is getting rotated in the pdf! How would I solve it??
the next pdf i make is overwriting ...how can i make separate pdf files
Use different name of the pdf file.
@@AndroidWithHaroon everytime i convert i will have to change the name f
rom the code na then ?
@@reubenkurian1155 you can keep the pdf name as of a variable name....and make sure the variable gets incremented everytime the program executes
@@debopamroy853 done buddy ..thanks
@@reubenkurian1155 welcome
Bro please tell me to how convert multiple pictures into .pdf file ?
any solution?
Sir when i select image that app got crash plz give me solution plz plz plz
try this for gallery image
public void gotogallery(View view) {
chooseImage();
}
public void chooseImage() {// choose image from gallery
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST); //activity result method call
}
@Override
protected void onActivityResult(int requestcode,int resultcode,Intent data ) {
super.onActivityResult(requestcode, resultcode, data);
if (requestcode == PICK_IMAGE_REQUEST && resultcode == RESULT_OK && data != null && data.getData() != null) {
Uri uri = data.getData();
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);
slectimageview=findViewById(R.id.imageviewimagetopdf_id);
slectimageview.setImageBitmap(bitmap);
} catch (IOException e) {
e.printStackTrace();
}
}
}
thanks for the nice video. How to make pdf to image ?
code is not working jese galary me pic choose karte hai baaar nikal jate hai
Check the log exception error
Sir please provide me source code link..
I want to show this pdf in my app how can I do that?
See part 3
Can u help me or not? Atleast reply
Thank u so much ❤
buddy this is not working on android 10
can anyone help?
my app crashed when i choose the picture from gallery
im also facing this
@@ZeeshanAli-dk9wd
The error is because you do not have the permission declared in the code to choose the photo
one solution is
go settings
Applications
search your app
storage and give permission
try this for gallery
public void gotogallery(View view) {
chooseImage();
}
public void chooseImage() {// choose image from gallery
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST); //activity result method call
}
@Override
protected void onActivityResult(int requestcode,int resultcode,Intent data ) {
super.onActivityResult(requestcode, resultcode, data);
if (requestcode == PICK_IMAGE_REQUEST && resultcode == RESULT_OK && data != null && data.getData() != null) {
Uri uri = data.getData();
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);
slectimageview=findViewById(R.id.imageviewimagetopdf_id);
slectimageview.setImageBitmap(bitmap);
} catch (IOException e) {
e.printStackTrace();
}
}
}
bro i am having a problem the pdf file is not created neither the image was inserted in this app and there is no error in android studio
please kindly solve my this error
The error is because you do not have the permission declared in the code to choose the photo
one solution is
go settings
Applications
search your app
storage and give permission