• I have a custom setup and everything is working fine but I have a need to set the PDF output page size, (or at a minimum to know the exact default PDF dimensions), as I want to use a background image for the output container div. This product is awesome, but I’m trying to stretch it’s capabilities

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dinamiko

    (@dinamiko)

    Hello @oldsportbiker47 ,

    It uses A4 format by default, I’m going to include a page size selector in the next version, for now you could add this filter as code snippet or in your theme’s functions.php with your width and height:

    add_filter('dkpdf_pdf_format', function() {
    return [200,200];
    });
    Thread Starter oldsportbiker47

    (@oldsportbiker47)

    I’m assuming that the function I reference in your code above is one of your functions, specifically the one that creates the PDF. What is the name of your function?

    Thread Starter oldsportbiker47

    (@oldsportbiker47)

    I think this is it

    function changing_dkpdf_pdf_format( $format )
    {
    $format = [400,400] ;
    return $format;
    }
    add_filter( ‘dkpdf_pdf_format’, ‘changing_dkpdf_pdf_format’ );

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.