Convert Image bitmap to PDF document in Android Studio PART 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ต.ค. 2024

ความคิดเห็น • 37

  • @idelvertyondouii5787
    @idelvertyondouii5787 ปีที่แล้ว +1

    can you convert pdfdocument to bitmap.?

  • @YADA70073
    @YADA70073 6 ปีที่แล้ว +1

    Thank you very much for you help... from Part1 and Part2.

  • @real33479
    @real33479 3 ปีที่แล้ว

    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?

  • @timothyhu5991
    @timothyhu5991 6 ปีที่แล้ว +3

    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.

    • @AndroidWithHaroon
      @AndroidWithHaroon  6 ปีที่แล้ว

      Check if u have initialized bitmap or not

    • @timothyhu5991
      @timothyhu5991 6 ปีที่แล้ว +1

      Programming Experts Yes I follow exactly your code but it crashed when I select a photo from gallery.

    • @umerblouch3922
      @umerblouch3922 6 ปีที่แล้ว

      same error i faced

    • @Emirhan13178
      @Emirhan13178 5 ปีที่แล้ว

      Same error

  • @TECHNOLOGYGEAR
    @TECHNOLOGYGEAR 5 ปีที่แล้ว +2

    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

  • @coolguy9236
    @coolguy9236 4 ปีที่แล้ว +1

    My image is getting rotated in the pdf! How would I solve it??

  • @muhammadarsalan9684
    @muhammadarsalan9684 4 ปีที่แล้ว +2

    Bro please tell me to how convert multiple pictures into .pdf file ?

  • @reubenkurian1155
    @reubenkurian1155 4 ปีที่แล้ว +1

    the next pdf i make is overwriting ...how can i make separate pdf files

    • @AndroidWithHaroon
      @AndroidWithHaroon  4 ปีที่แล้ว

      Use different name of the pdf file.

    • @reubenkurian1155
      @reubenkurian1155 4 ปีที่แล้ว

      @@AndroidWithHaroon everytime i convert i will have to change the name f
      rom the code na then ?

    • @debopamroy853
      @debopamroy853 4 ปีที่แล้ว

      @@reubenkurian1155 you can keep the pdf name as of a variable name....and make sure the variable gets incremented everytime the program executes

    • @reubenkurian1155
      @reubenkurian1155 4 ปีที่แล้ว

      @@debopamroy853 done buddy ..thanks

    • @debopamroy853
      @debopamroy853 4 ปีที่แล้ว

      @@reubenkurian1155 welcome

  • @darshanshirwale7904
    @darshanshirwale7904 4 ปีที่แล้ว +2

    Sir when i select image that app got crash plz give me solution plz plz plz

    • @juniiikhan405
      @juniiikhan405 4 ปีที่แล้ว +2

      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();
      }
      }
      }

  • @nwcoder
    @nwcoder 2 ปีที่แล้ว +1

    Sir please provide me source code link..

  • @reubenkurian1155
    @reubenkurian1155 4 ปีที่แล้ว

    buddy this is not working on android 10
    can anyone help?

  • @ravilakhatariya8662
    @ravilakhatariya8662 3 ปีที่แล้ว +1

    code is not working jese galary me pic choose karte hai baaar nikal jate hai

  • @sakar276
    @sakar276 6 ปีที่แล้ว +2

    I want to show this pdf in my app how can I do that?

    • @AndroidWithHaroon
      @AndroidWithHaroon  6 ปีที่แล้ว +1

      See part 3

    • @sakar276
      @sakar276 6 ปีที่แล้ว +1

      Can u help me or not? Atleast reply

    • @sakar276
      @sakar276 6 ปีที่แล้ว +1

      Thank u so much ❤

  • @dipeshpatel133
    @dipeshpatel133 5 ปีที่แล้ว

    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

    • @altokecali301
      @altokecali301 5 ปีที่แล้ว

      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

  • @ajinkyayerlekar2618
    @ajinkyayerlekar2618 5 ปีที่แล้ว

    thanks for the nice video. How to make pdf to image ?

  • @umerblouch3922
    @umerblouch3922 6 ปีที่แล้ว +2

    my app crashed when i choose the picture from gallery

    • @ZeeshanAli-dk9wd
      @ZeeshanAli-dk9wd 5 ปีที่แล้ว

      im also facing this

    • @altokecali301
      @altokecali301 5 ปีที่แล้ว +1

      @@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

    • @juniiikhan405
      @juniiikhan405 4 ปีที่แล้ว

      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();
      }
      }
      }