Implement your own PDF processing in SearchWP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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