Skip to main content

gfpdf_remote_request_args

Description​

Modify the arguments used when making external requests for images or CSS during PDF generation.

Version​

This filter was introduced in Gravity PDF 6.13

Parameters​

$args | array​

Usage​

The following code will increase the request timeout from 5 seconds to 10 seconds:

add_filter( 'gfpdf_remote_request_args', function( $args ) {
$args['timeout'] = 10; // increase to 10 seconds

return $args;
} );

Or you can bypass SSL verification when using a self-signed certificate in your development environment:

add_filter( 'gfpdf_remote_request_args', function( $args ) {
$args['sslverify'] = false;

return $args;
} );

Source Code​

This filter is located in /src/Helper/Mpdf/Request.php.