• Resolved renko

    (@renko)


    Hello,

    I am using your plugin to generate invoices on WooCommerce. The issue I faced is that not all text I placed in the footer is displayed on the generated invoice. Flew lines are cut.

    Please see the image of the generated invoice here: https://drive.google.com/file/d/1leMyEkPU2UjmlPaop-XRg9KumklCZU-8/view?usp=sharing

    As you can see a few lines below are missing and one line is cut in a half.

    So could you please fix this issue, maybe to move the entire text a little bit higher or something?

    Thank you and best regards,
    Rene

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @renko

    Please add the code snippet below to your theme functions.php file:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
    function wpo_wcpdf_custom_styles ( $document_type, $document ) {
        ?>
        #footer { bottom: 0cm; }
        <?php
    }

    If you never worked with actions/filters, please read our documentation page: How to use filters

    Thread Starter renko

    (@renko)

    Hello @alexmigf,

    Thank you for a fast response. Do you plan to fix this in next version of the plugin? I can wait for that.
    However I will add the code to my functions file anyway, but if you will fix it in the next version I will remove it after update. What are your plans?

    Thank you,
    Rene

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @renko

    I think the best solution would be change the footer height, like this:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
    function wpo_wcpdf_custom_styles ( $document_type, $document ) {
        ?>
        #footer { height: 3cm; }
        <?php
    }

    With the Professional extension you can set the footer height on the plugin settings.

    I understand your point of view, but every client has different needs, and this way you can define the best height for you.

    Thread Starter renko

    (@renko)

    Hello,

    Aha ok, no problem, I already implemented your first solution with 0 cm and it works ok now.

    Thank you for the fix.

    Kind regards,
    Rene

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @renko

    I don’t think changing the bottom is a good idea because could lead to some issues with the spacing and could overlap other data. I recommend you to switch to the height solution.

    Btw, the setting is not in the Professional but in the Premium templates extension, my fault.

    Thread Starter renko

    (@renko)

    Hi @alexmigf

    Ok, I change that to height. Thank you for your support. Highly appreciate it.

    Best regards,
    Rene

    Plugin Contributor alexmigf

    (@alexmigf)

    Hello @renko

    Can you show me your current height value?

    Thread Starter renko

    (@renko)

    I set the height to 3cm and it looks ok now.

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @renko

    In that case better use like this:

    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
    function wpo_wcpdf_custom_styles ( $document_type, $document ) {
        ?>
    	#footer {
    		bottom: -3cm;
    		height: 3cm;
    	}
    	@page {
    		margin-bottom: 4cm;
    	}
        <?php
    }

    This way we grant that all space remains the same for the all document.

    • This reply was modified 4 years, 6 months ago by alexmigf.
    Thread Starter renko

    (@renko)

    Ok thank you.

    Regards,
    Rene

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Text on footer of invoice is cut’ is closed to new replies.