#6 Create PDF from User Input : Android Studio PDF Document

Sdílet
Vložit
  • čas přidán 2. 03. 2020
  • From this video we will learn how to create a pdf invoice based on user Input. The basic idea of this video is to get values from user and generate invoice according to that. This topic will be covered in three videos. After watching this video you will be able to create dynamic PDF based on user input.
    Pizza Head Image: drive.google.com/file/d/1uqSX...
    Part 1 Video: • #6 Create PDF from Use...
    Part 2 Video: • #7 Create PDF from Use...
    Part 3 Video: • #8 Create PDF from Use...
    Join our Telegram group for more benefits: t.me/joinchat/AAAAAFAMe0klQXW...
    Please like us on Facebook: SarthiTechnology

Komentáře • 93

  • @wissemmiled3383
    @wissemmiled3383 Před 4 lety +2

    thanks for this awesome tutorial 🇹🇳

  • @sabrinafeliz4822
    @sabrinafeliz4822 Před 3 lety

    thanks a lot sir . great work

  • @espectactorteatro4028

    Hello,
    I made the example adapting to my APP.
    But it does not appear on the device (emulator) the pdf document.
    It doesn't give any error in logcat.
    Can you help please

  • @ismaildjennane8013
    @ismaildjennane8013 Před rokem

    i need your help, if you have method to save the global layout as image and store it as pdf format

  • @bholethakur6999
    @bholethakur6999 Před 3 lety

    Sir, how can I save user input data in xml formate like pdf without using any database server ?

  • @deepaksingh-pp5tw
    @deepaksingh-pp5tw Před 4 lety

    Brother
    How to add Hyperlinks in a pdf file using Android Studio?
    Please help.

  • @salmaarouga6685
    @salmaarouga6685 Před 4 lety +1

    thank you for your tutos but i have a question, can I use this method to generate a pdf also from recyclerViews that are shown in a UI ?

  • @licutricu
    @licutricu Před rokem

    Thank you very much for your videos!
    They helped me a lot

  • @zayyutechie8390
    @zayyutechie8390 Před 3 lety

    Can't open PDF file after decoding String and downloading file how to fix it kotlin Android

  • @baishakheemardi3569
    @baishakheemardi3569 Před 3 lety

    Sir , How to do if current page is full it should go next page, please sir give solution for it.

  • @61analizer
    @61analizer Před 3 lety +1

    Please can you submit this project on Github??

  • @sameersharma1610
    @sameersharma1610 Před 4 lety

    Nice explaination. Just post full video.

    • @SarthiTechnology
      @SarthiTechnology  Před 4 lety

      Already uploaded sir. Please check here: czcams.com/video/irHnnD0kvC4/video.html

    • @SarthiTechnology
      @SarthiTechnology  Před 4 lety

      czcams.com/video/mw3MHA3Q0IM/video.html

  • @marcianoalveo9344
    @marcianoalveo9344 Před 2 lety

    Hi @Sarthi Technology how is everything. I'm following your videos and learning a lot about what you do, but I can't find the sequence that this video has... it stops after you put myPaint.setTextSize(300); and I don't know what's next... could you give me indications of what the next video is, since I looked for it on your channel and I can't find it... Thanks in advance for taking the time to share your knowledge with the community. Greetings and blessings.

    • @SarthiTechnology
      @SarthiTechnology  Před 2 lety +1

      Hello,
      Thanks for this valuable comment..
      Now I have added link of all three parts of this tutorial in the description of all three videos.
      I have also added invoice head image which you will be needed to follow this tutorial.
      Thanks for your kind support and valuable comment.

    • @marcianoalveo9344
      @marcianoalveo9344 Před 2 lety +1

      @@SarthiTechnology Thanks my brother... you are a genious... greetings and blessings...

  • @abhilashmalkar904
    @abhilashmalkar904 Před 3 lety

    How can I add hyperlink or image with link in pdf??

  • @jayshah1976
    @jayshah1976 Před 4 lety +2

    I saw all videos of this series and found it very helpful but i have one doubt that how can i add multi line text in my pdf file programically ??

    • @SarthiTechnology
      @SarthiTechnology  Před 4 lety +2

      Oh that's a good question. I need to do some experiments. I will let you know.
      .
      Thanks for asking this question.🙏🙏🙏

    • @InPic
      @InPic Před 4 lety +4

    • @manzoormuhammed8214
      @manzoormuhammed8214 Před 3 lety +1

      @@SarthiTechnology Sir, is that available now? am looking for this sir

    • @tonymukelabai1283
      @tonymukelabai1283 Před 2 lety

      Yeah... Am also kinda trying to figure that out to...

  • @YRGAMING18495
    @YRGAMING18495 Před 3 lety +1

    Good work bro you really working hard 👍

  • @user-vy1ex9xn5e
    @user-vy1ex9xn5e Před rokem

    First thank for this great
    tutorial
    I have question
    Can we design the pdf first in for example Adobe illustrator then take the position and size of all contents ?

    • @SarthiTechnology
      @SarthiTechnology  Před rokem +1

      Yes I do the same thing but it will help you to assume the position.
      I do not get the exact position using this way but it helps lot.

    • @user-vy1ex9xn5e
      @user-vy1ex9xn5e Před rokem

      @@SarthiTechnology
      Thank for reply

  • @NEZARGAMAL
    @NEZARGAMAL Před 3 lety

    how to it in kotlin

  • @adielmoran6986
    @adielmoran6986 Před 3 lety +1

    This works but for android versions 9 and 10 it throws me an exception in getExternalStorageDirectory, could you please give me a solution or an alternative?

    • @SarthiTechnology
      @SarthiTechnology  Před 3 lety +2

      Please set requestLegacyExternalStorage to true in your app's manifest file. In order to access media files using native files methods on Android 10, you must also request the READ_EXTERNAL_STORAGE permission.
      developer.android.com/training/data-storage/shared/media

    • @mustaphazaaim3268
      @mustaphazaaim3268 Před rokem

      @@SarthiTechnology Thank you very much ❤❤

  • @vikassaini6331
    @vikassaini6331 Před 3 lety +2

    Hi,sir thanks for this video 😊
    I watched your this video and it helps me a lot, I follow all the steps that you did in this video, but sir i am facing a problem,my app create pdf successfully and i uses a toast message of path where the file is stored, and it show me the path is storage/emulated/0/yourpdf.pdf, but i can't find this file in my device.
    Please sir help me🙏, I will be very grateful to you

    • @ailemak59
      @ailemak59 Před 3 lety +2

      Did you resolve the problem? I have the same

  • @cleawrence
    @cleawrence Před 4 lety

    Hi github link to your project ?

  • @real33479
    @real33479 Před 3 lety +1

    When writing long text that goes beyond the page boundaries and does not complete the text inside the page, what is the reason?

    • @aryanbhaskar7872
      @aryanbhaskar7872 Před rokem

      Coz he has defined page no. - 1 thats y afterall he has to create a single page invoice..

  • @codewithu44
    @codewithu44 Před rokem

    Sir I have written same code but whenever I clicked on a button nothing happened...

  • @alvincyberindo6301
    @alvincyberindo6301 Před 4 lety

    Hello, i want to ask, can i open my preview pdf file before download the file?

    • @SarthiTechnology
      @SarthiTechnology  Před 4 lety

      I didn't understand your concern. This example creates invoice based on a format.
      Please explain a bit more.

    • @alvincyberindo6301
      @alvincyberindo6301 Před 4 lety

      @@SarthiTechnology so i want to previewing that invoice first in another activity, and add button download to execute the try and catch to download

    • @theintroverttalk
      @theintroverttalk Před 3 lety

      @@alvincyberindo6301 use Intent.ACTION_VIEW and use it inside startActivity.

  • @pltsm3970
    @pltsm3970 Před 3 lety +1

    getExternalStorageDirectory it gives an error of deprecated.
    Plz help me

    • @folutile
      @folutile Před 3 lety

      you can still use it, it is just discouraged. Don't let the -slash- on the method bother you, it will still run.

  • @ujjwaldeep5175
    @ujjwaldeep5175 Před 3 lety +1

    Sir, how to know if the current page of pdf is full and then shift the next data to next page of pdf??

    • @SarthiTechnology
      @SarthiTechnology  Před 3 lety

      Not sure but I think this library has not such type of option.

  • @smartitsolutionbd
    @smartitsolutionbd Před rokem

    "WRITE_EXTERNAL_STORAGE" not support, what can I do in this situation dear dada?

  • @g59project65
    @g59project65 Před 3 lety +6

    post this on github or plz provide the link of this peoject!!

  • @parameshwarmnayak807
    @parameshwarmnayak807 Před 4 lety

    How to extract data from myphpadmin and display it in pdf?any source

  • @digitalwild707
    @digitalwild707 Před 3 lety

    Bro plz upload invoice print from android

  • @sameersharma1610
    @sameersharma1610 Před 4 lety +1

    Is there any way to set font we want ?

  • @pltsm3970
    @pltsm3970 Před 3 lety

    Hi
    I have a problem
    When i create pdf i don't know whether it is not created or i can not find the location of saved file.
    Plz help me.
    Not all code is the same what you just wrote. But this part of code has a line on it. "getExternalStorageDirectory" i think this make problem.

    • @sachinpunia1419
      @sachinpunia1419 Před 3 lety +1

      Same problem with me bruh don't know where file is saved

    • @SarthiTechnology
      @SarthiTechnology  Před 3 lety

      I think you need to manually give the permission of storage. After that it will work same as shown in the video.

    • @pranavkurkure6091
      @pranavkurkure6091 Před 3 lety

      @@SarthiTechnology I gave the permission manually but still the pdf is NOT downloading or showing in the device files.

    • @SarthiTechnology
      @SarthiTechnology  Před 3 lety

      If you are using Android 10 device you need to add requestLegacyExternalStorage true in the manifest file.
      developer.android.com/about/versions/11/privacy/storage

  • @akashvatane5458
    @akashvatane5458 Před rokem

    can you share this source code then helpful to hands-on with this

  • @lukecross5439
    @lukecross5439 Před 3 lety

    Can using this library for comercial apps?

    • @SarthiTechnology
      @SarthiTechnology  Před 3 lety

      Yes

    • @lukecross5439
      @lukecross5439 Před 3 lety

      @@SarthiTechnology But, is need pay to devs monthly?

    • @nicator8380
      @nicator8380 Před 3 lety

      @@lukecross5439 this information is freee bro, no need to pay. it's okay to copy and paste.

  • @balumaniyam503
    @balumaniyam503 Před 4 lety

    Pls share the project file

  • @hamizahazhar5679
    @hamizahazhar5679 Před 2 lety

    hello, can you pls show activity_main.xml coding :)

  • @pakgeochannel8419
    @pakgeochannel8419 Před 3 lety

    The image you set via Drawable. In PDF file
    That's how to set the image via imageview. In PDF file
    What is java coding
    وہ تصویر جس کو آپ نے ڈرا ایبل کے ذریعے سیٹ کیا۔ پی ڈی ایف فائل میں
    وہ ہی تصویرکو تصویرویو کے ذریعے سیٹ کرنے کا طریقہ کیا ہے۔ پی ڈی ایف فائل میں

  • @aymandoukkali7789
    @aymandoukkali7789 Před 3 lety

    share with us source cde

  • @shounaklokhande8885
    @shounaklokhande8885 Před 3 lety

    How to name pdf file dynamically ?. I have to name my pdf file with invoice no.

    • @jorgesalas7287
      @jorgesalas7287 Před 3 lety

      When you create the file, just change the '\Hello.pdf' with your invoice no. and don't forget the file extension '.pdf'. You can use a variable or Text from EditText.

    • @shounaklokhande8885
      @shounaklokhande8885 Před 3 lety

      @@jorgesalas7287 I tried this , but not working.

    • @SarthiTechnology
      @SarthiTechnology  Před 3 lety

      Just use invoiceNumber+pdfName.pdf
      I have shown this example in Sqlite and Firebase video in this playlist.

    • @shounaklokhande8885
      @shounaklokhande8885 Před 3 lety

      @@SarthiTechnology here you are entering your value your self.

    • @shounaklokhande8885
      @shounaklokhande8885 Před 3 lety

      @@SarthiTechnology I m creating invoice no with combination of word and no. And I want to use that invoice no as pdf file name. I don't want use to enter no.

  • @rahulKaushal39
    @rahulKaushal39 Před 3 lety

    PDF file is not generating in my phone ? App is running..

  • @samsamitkar2369
    @samsamitkar2369 Před 2 lety

    Show the codes for XML file

  • @dor19741
    @dor19741 Před 2 lety

    source code?