Send a PDF file and a text message. Find if the text message exists in the pdf file.

The text message is a picture in the PDF file.


  • What tool do you need to use i order to use it?
  • It doesn't matter if it paid service or not.
  • It doesn't matter if it open source or not.


  • This technology is probably based on machine learning.
  • Regular user should use it without knowledge in coding.
  • You only need to send a PDF file and text message and then you retrieve answer if there is a match and what result it is.
  • "The text message is a picture in the pdf file" - do you mean that the text message says something like "a boat" and the tool has to search the PDF for a picture of a boat?
    – Mawg
    Nov 16, 2018 at 10:34
  • "The text message is a picture in the PDF file", even if it is a picture of text, it is not a text message. You would have to run it though OCR first.
    – Mawg
    Feb 22 at 11:01

2 Answers 2


No need for machine learning, unless the pdf file is a scanned or drawn document.

If you install the python pdfminer six library you can simply run the pdf through the tool to convert it to text and then search the text for the phrase. Note that scanned/drawn documents may contain no text or garbled text without using OCR (optical character recognition).

  • Thank you for your help! I forgot to update a important info. Please read it. Thanks! Aug 18, 2018 at 7:58

If you want to extract text from a pdf with pixel grahics in it, you can:

  1. extract thes PNGs/JPG with a command-line tool such as pdfimages:

    Pdfimages  saves  images  from  a  Portable Document Format (PDF)
    file as Portable Pixmap (PPM), Portable Bitmap (PBM), 
    Portable Network Graphics  (PNG), Tagged Image File Format (TIFF), 
    JPEG, JPEG2000, or JBIG2 files.
  2. Perform Online Character Recognition (OCR) on the images

A range of tools that can do both was discussed here: Free OCR software that makes a PDF searchable (with searchable text at the right place) (11 Answers)

Another possibility is to automatically upload the images to a cloud service that extracts text (and even identifies fonts and collects all types of other metadata) such as Google Document AI - but beware , these offerings change all the time (naming, pricing, capablities).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.