Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Implement your own PDF processing in SearchWP
<?php
function my_searchwp_external_pdf_processing( $content, $filename, $post_id ) {
if( class_exists( 'My_Awesome_PDF_Parser' ) ) {
$parser = new My_Awesome_PDF_Parser();
$content = $parser->extract_text_from_pdf( $filename );
}
return $content;
}
add_filter( 'searchwp_external_pdf_processing', 'my_searchwp_external_pdf_processing', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.