This sounds like the PDF document that you want to OCR has already the text as text inside, or? In this case no OCR is required, as the PDF is already searchable and you can get text from pdf directly.
OCR is helpful if the text is provided as image inside a PDF, as it is typically for PDF from scans.