How to search pdf attachment?

I would recommend you first to search attachments by your search term. For example:

$attachments_query = new WP_Query( array(
    's'                 => 'Your search query', // <-- Your search term
    'post_type'         => 'attachment',
    'post_mime_type'    => 'application/pdf',
    'post_status'       => 'inherit',
    'posts_per_page'    => -1,
) );

With this query, you will get all PDF files that fit your search query term. All you need from this query, is attachments IDs, to get them, use this function:

$attachments_ids = wp_list_pluck( $attachments_query->posts, 'ID' );

Now, when you have attachment IDs, you can look for posts that have any of those IDs inside ACF File field (ACF stores ID inside File filed in database). To get posts, run this query:

$query = new WP_Query( array(
    'post_type'         => 'your_post_type', // <-- Your post type here
    'posts_per_page'    => -1,
    'meta_query'        => array(
        array(
            'key'       => 'your_pdf_field_key', // <-- ACF field name
            'value'     => $attachments_ids,
            'compare'   => 'IN'
        )
    )
) );

The code is not tested, but it must select you all posts with searched attachments.

Here are also links to the documentation:

  1. Attachments query:
    https://developer.wordpress.org/reference/classes/wp_query/#mime-type-parameters
  2. wp_list_pluck function:
    https://developer.wordpress.org/reference/functions/wp_list_pluck/
  3. WP_Meta_Query:
    https://developer.wordpress.org/reference/classes/wp_query/#custom-field-post-meta-parameters