relevanssi_send_pdf_files

apply_filters( 'relevanssi_send_pdf_files', boolean $send_file, int $post_id )

This filter controls on a per-file basis whether files are uploaded or not.

Parameters

$send_file
(boolean) If true, Relevanssi uploads the file for reading. If false, the reading server fetches the file.

$post_id
(int) The attachment post ID.

More information

When you use Relevanssi to read the attachment contents, Relevanssi provides two possible methods of delivering the files to the attachment reading server. You can either have your server upload the files to the Relevanssi reading server or have your server send the file URL so the reading server can then fetch the file.

If you choose the file upload method, you can use this filter hook to tell Relevanssi to use the URL method for specific files. Perhaps there’s a file where it’s better to have the reader fetch the file.

add_filter( 'relevanssi_send_pdf_files', function( $send_file, $post_id ) {
  if ( 42 === $post_id ) {
    $send_file = false;
  }
  return $send_file;
}, 10, 2 );