Available since: 2.6.2
searchwp_pdf_spaces_to_content_percentage
View Parameters »A number of guards have been implemented in SearchWP’s parsing and indexing of PDFs. This hook allows you to better control whether SearchWP has detected a problem in parsing PDFs by setting an upper limit as to how much of the content is white space when compared to characters.
By default if more than 5% of the content is found to be white space, the PDF is considered to be problematic and SearchWP will skip it. You can control this threshold like so:
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 | |
// Allow PDFs with up to 10% white space to be indexed. | |
add_filter( 'searchwp_pdf_spaces_to_content_percentage', function( $percentage ) { | |
return 10; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$percentage |
Integer |
Threshold for white space percentage of overall content |