• Resolved stecroyven

    (@stecroyven)


    Hi,

    I am experiencing an issue with the plugin, where it doesn’t display tables correctly.

    Reading through the support topics on here, this one is similar to the issue I’m experiencing. However, that one was resolved almost a year ago. I have version 4.0.4 of the plugin installed, so it’s up to date.

    This is the basic code I have for my table:

    <table border=1>
    <tbody>
    <tr>
      <td>Name:</td>
      <td>Joe Bloggs</td>
    </tr>
    
    <tr>
      <td>Name:</td>
      <td>Address</td>
    </tr>
    
    </tbody>
    </table>

    But the table generates like this in the PD

    As you can see, the second column doesn’t have the same alignment as the first.

    I have tried to add padding to try and get this displaying correctly (a suggestion in the other post I found before it was reported to be resolved) but this gives the following:

    <table border=1>
    <tbody>
    <tr style="height:20px">
      <td style="padding-top:20px">Name:</td>
      <td style="padding-top:20px">[AFirstname] [ALastname]</td>
    </tr>
    
    <tr style="height:20px">
      <td style="padding-top:20px">Name:</td>
      <td style="padding-top:20px">Address</td>
    </tr>
    
    </tbody>
    </table>

    I love the plugin, but I’ve been trying to get around this issue for nearly three hours now and I think it must be a bug.

    Please can you assist?

    Thanks
    Steve

    • This topic was modified 1 year, 1 month ago by stecroyven. Reason: First block of code was incorrect
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author ZealousWeb

    (@zealopensource)

    Hello @stecroyven,

    Thank you for getting in touch with me. I’d like to request your assistance in adding a code snippet to a specific file and line number. Please refer to the attached screenshots for clarity:

    Before screenshots: https://prnt.sc/RhU-8w4POkvj
    After screenshots: https://prnt.sc/91Zn50kv47ly

    File Path: wp-content/plugins/generate-pdf-using-contact-form-7/inc/front
    File Name: class.cf7-pdf-generation.front.action.php
    Line Number: 302

    Please insert the following code at line number 302:

    $html = str_replace('<br />', '', $html);

    OUTPUT PDF

    screenshots 1: https://prnt.sc/r5n6iwNwZbcd
    screenshots 2: https://prnt.sc/VQ1a_olNPLwx

    If you have any questions or need further clarification, feel free to reach out. Your cooperation is greatly appreciated.

    Thank you,
    ZealousWeb

    Thread Starter stecroyven

    (@stecroyven)

    Thank you very much for the quick response. This has resolved the issue.

    Is it just an issue that’s unique to my instance, or a bug that’s being fixed and not yet released?

    The reason for asking is to check if I will need to test functionality after any version update. Will updates to the plugin include this fix or are they likely to remote the manually added line?

    Many thanks
    Steve

    Plugin Author ZealousWeb

    (@zealopensource)

    Hello @stecroyven,

    This is not a bug; the line break tag removal is intentionally added by custom code at line number 302.

    The table tag is not a feature element used by the users of this plugin.

    Feel free to reach out if you have any questions about adding custom code; I’m here to help.

    Thank you,
    ZealousWeb

    Plugin Author ZealousWeb

    (@zealopensource)

    Hello @stecroyven,

    We would greatly appreciate it if you could share your feedback with us.
    https://www.ads-software.com/plugins/generate-pdf-using-contact-form-7/#reviews

    Thank you,
    ZealousWeb

    On the contrary, table formatting is literally ALL I use.

    How is everyone else formatting their PDFs? I couldn’t get any styling to work aside from inline tables.

    Thread Starter stecroyven

    (@stecroyven)

    Hi,

    I am a bit confused when you say “The table tag is not a feature element used by the users of this plugin”, as there is at least one other person (the reply above).

    Also, while I was trying to locate a solution, before your most helpful response above, I could only locate this: https://mpdf.github.io/tables/tables.html I found this after following the link at the bottom of the configuration page regarding page numbers, so it looks like tables are supported by mPDF (and they work with the line break fix). Is it just an issue with the top layer plugin?

    Will I need to add this line back in whenever the plugin updates?

    Thanks
    Steve

    Plugin Author ZealousWeb

    (@zealopensource)

    Hello @nikhdeveloper, @stecroyven,

    The table formatting issue has been resolved in the latest version 4.0.5. Kindly update the plugin.

    If you have any questions, feel free to reach out. I’m here to assist.

    Thank you,
    ZealousWeb

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Table formatting is not working’ is closed to new replies.