Please show the support guys if you liked this video then please hit the like button like this and also share this video by hitting this share button and please hit this red subscribe button and turn all notifications by selecting all so you will get all the notifications of my channel it is totally free hi friends today in this tutorial I will be talking about that how to add a watermark to a PDF file in python using the py PDF to library so this is the PDF file we will be generating and he wins you can see that there is a watermark image embedded into it into this PDF document this is actual watermark PDF image you can see that we will be embedding this inside this our PDF document so let's start building this application so let me just tell you the directory structure so this is my let me just show you the directory structure so this is my image watermark and this is a sample PDF file let me delete all these first of all let me delete the output file let me just close this and delete this and we have the empty ab dot py file let me also delete all the code and start from scratch so first of all in order to build this application you you just need this liability which is pip install py PDF to library so just install this by executing this command I have already have this library so right at the very top we just need to import this library PYP PDF - after importing that we just need to define the path of our him input file so input file the sample dot PDF so this is a file let me also define the watermark file so let me just assign this as a watermark dot PDF let me also define the output file so making that output dot PDF so just define all the three paths of the input watermark image and the output file and now we will open the input file with this open method here we will just pass the input file variable and we will also be passing this flag which is read binary so RB so PDF file is kind of a binary file and we will be opening this as a input file and put a colon here and now we will be using making a PDF file variable inside this I will be using a method of 4 py PDF - which is a PDF file reader so which will actually read the PDF file and here you just need to pass your filename which is input file so that would that would actually read the input file for us and similarly we just need to read the watermark so again we will write with open this time I will pass the watermark and again this we will pass this read.