Continue reading Indexing embedded PDFs for the parent post

Indexing embedded PDFs for the parent post

…} } return $block; } ); PDF.js Viewer Shortcode PDF.js Viewer Shortcode uses a shortcode with the file name in the url parameter. add_filter( ‘relevanssi_content_to_index’, ‘rlv_pdfjs_content’, 10, 2 ); function rlv_pdfjs_content( $content, $post ) { $m = preg_match_all( ‘/\[pdfjs-viewer url=[“\’](.*?)[“\’]/’, $post->post_content, $matches ); if ( $m ) { global $wpdb;……need to establish a connection between the PDF and the post, based on the URL in the shortcode. The same code works with different PDF embedders; you only have to adjust the regex to match the shortcode used by the plugin. WordPress Core File block If you use the default……WordPress. Thus, Relevanssi won’t know the PDF is embedded in the post and cannot index the PDF contents for the parent post. Most of these plugins use shortcodes to embed the PDF viewer on a page. To get Relevanssi to index the embedded PDF contents for the parent post, you…

Read more Indexing embedded PDFs for the parent post 5 Comments on Indexing embedded PDFs for the parent post
Continue reading Indexing and searching PDFs in WordPress

Indexing and searching PDFs in WordPress

…service on a separate server. Which PDF files can you index? Since Relevanssi is a WordPress search, Relevanssi operates on WordPress posts (including all the different post types). So, to have Relevanssi index your PDFs, they need to be WordPress posts. That’s fortunately really simple: upload your PDF files to……or EU. You can choose from the settings which server you want to use. There the files are processed with Tika. While we don’t care what’s inside the files you index on our server, the server needs to make working copies. The server removes the documents after use. It is……attachments? Yes! Relevanssi can handle lots of different formats. Our server uses Apache Tika to process the files, giving us a wide variety of supported formats. The essential document formats are covered: Word documents (DOC and DOCX), Open Office documents (ODT), RTFs, etc. How does the attachment indexing work? Relevanssi…

Read more Indexing and searching PDFs in WordPress 78 Comments on Indexing and searching PDFs in WordPress