#6 Create PDF from User Input : Android Studio PDF Document
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
thanks for this awesome tutorial 🇹🇳
thanks a lot sir . great work
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
i need your help, if you have method to save the global layout as image and store it as pdf format
Sir, how can I save user input data in xml formate like pdf without using any database server ?
Brother
How to add Hyperlinks in a pdf file using Android Studio?
Please help.
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 ?
Please try, I think it should work.
@@SarthiTechnology thank you
@@salmaarouga6685 have u tried
Thank you very much for your videos!
They helped me a lot
Can't open PDF file after decoding String and downloading file how to fix it kotlin Android
Sir , How to do if current page is full it should go next page, please sir give solution for it.
Please can you submit this project on Github??
Nice explaination. Just post full video.
Already uploaded sir. Please check here: czcams.com/video/irHnnD0kvC4/video.html
czcams.com/video/mw3MHA3Q0IM/video.html
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.
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.
@@SarthiTechnology Thanks my brother... you are a genious... greetings and blessings...
How can I add hyperlink or image with link in pdf??
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 ??
Oh that's a good question. I need to do some experiments. I will let you know.
.
Thanks for asking this question.🙏🙏🙏
@@SarthiTechnology Sir, is that available now? am looking for this sir
Yeah... Am also kinda trying to figure that out to...
Good work bro you really working hard 👍
🙏
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 ?
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.
@@SarthiTechnology
Thank for reply
how to it in kotlin
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?
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
@@SarthiTechnology Thank you very much ❤❤
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
Did you resolve the problem? I have the same
Hi github link to your project ?
When writing long text that goes beyond the page boundaries and does not complete the text inside the page, what is the reason?
Coz he has defined page no. - 1 thats y afterall he has to create a single page invoice..
Sir I have written same code but whenever I clicked on a button nothing happened...
Hello, i want to ask, can i open my preview pdf file before download the file?
I didn't understand your concern. This example creates invoice based on a format.
Please explain a bit more.
@@SarthiTechnology so i want to previewing that invoice first in another activity, and add button download to execute the try and catch to download
@@alvincyberindo6301 use Intent.ACTION_VIEW and use it inside startActivity.
getExternalStorageDirectory it gives an error of deprecated.
Plz help me
you can still use it, it is just discouraged. Don't let the -slash- on the method bother you, it will still run.
Sir, how to know if the current page of pdf is full and then shift the next data to next page of pdf??
Not sure but I think this library has not such type of option.
"WRITE_EXTERNAL_STORAGE" not support, what can I do in this situation dear dada?
post this on github or plz provide the link of this peoject!!
How to extract data from myphpadmin and display it in pdf?any source
Sorry sir, I don't have the source code.
Bro plz upload invoice print from android
Is there any way to set font we want ?
yes it's, android:fontFamily on your xml file
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.
Same problem with me bruh don't know where file is saved
I think you need to manually give the permission of storage. After that it will work same as shown in the video.
@@SarthiTechnology I gave the permission manually but still the pdf is NOT downloading or showing in the device files.
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
can you share this source code then helpful to hands-on with this
Can using this library for comercial apps?
Yes
@@SarthiTechnology But, is need pay to devs monthly?
@@lukecross5439 this information is freee bro, no need to pay. it's okay to copy and paste.
Pls share the project file
hello, can you pls show activity_main.xml coding :)
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
وہ تصویر جس کو آپ نے ڈرا ایبل کے ذریعے سیٹ کیا۔ پی ڈی ایف فائل میں
وہ ہی تصویرکو تصویرویو کے ذریعے سیٹ کرنے کا طریقہ کیا ہے۔ پی ڈی ایف فائل میں
share with us source cde
How to name pdf file dynamically ?. I have to name my pdf file with invoice no.
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.
@@jorgesalas7287 I tried this , but not working.
Just use invoiceNumber+pdfName.pdf
I have shown this example in Sqlite and Firebase video in this playlist.
@@SarthiTechnology here you are entering your value your self.
@@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.
PDF file is not generating in my phone ? App is running..
Android version of your device?
@@SarthiTechnology Android 10
This example will work below Android 10. For 10 you need to use MediaStore API.
developer.android.com/training/data-storage/shared/media
@@SarthiTechnology thanks
Show the codes for XML file
Please join the telegram group and share the request.
source code?