You can use the following filters if the "Full Page Capture to PDF " option is disabled:
- in order to change the main content of pdf/print document
add_filter( 'bwsplgns_get_pdf_print_content', {your_function} );
- in order to change the top running title
add_filter( 'bwsplgns_top_running_title', {your_function} );
- in order to change the bottom running title
add_filter( 'bwsplgns_bottom_running_title', {your_function} );
- in order to change the title of pdf/print document
add_filter( 'bwsplgns_get_pdf_print_title', {your_function}, 10, 2 );
For example, go to the plugin settings page -> "Custom Code" tab, mark "Activate custom PHP code." checkbox in the "PHP" section and add the following code:
add_filter(
'bwsplgns_get_pdf_print_content',
function( $content ) {
$my_content = '<p>Lorem ipsum dolor sit amet</p>';
$more_content = '<p>Donec fringilla libero ac sapien</p>';/* if you want add some data before to the main content */ return $my_content . $content; /* if you want add some data after the main content */ return $content . $my_content; /* if you want add some data both sides the main content */ return $my_content . $content . $more_content; /* if you want add some data instead of the main content */ return $my_content; }
);
For more information about WordPress filters, see here.
If "Full Page Capture to PDF " option is enabled please use beforeImageToPdf()
and afterImageToPdf()
JavaScript functions for changing PDF document.
For example, go to the plugin settings page -> "Custom Code" tab, mark "Activate custom JavaScript code." checkbox in the "JavaScript" section and add the following code:
function beforeImageToPdf() {
document.getElementById("site-header").style.display = "none";
}
function afterImageToPdf() {
document.getElementById("site-header").style.display = "block";
}
Replace "site-header" on the id of the element you need to hide.
This article related to PDF & Print by BestWebSoft plugin
Additional resources: PDF & Print - User Guide
Still need help? Feel free to contact our friendly support team. Create a private ticket