vue-html2pdf icon indicating copy to clipboard operation
vue-html2pdf copied to clipboard

Blank pdf when using table in section

Open mohammadmrd74 opened this issue 4 years ago • 2 comments

I used table in pdf-content slot and when I generate the pdf, its all blank.

<vue-html2pdf
        :show-layout="false"
        :float-layout="true"
        :enable-download="false"
        :preview-modal="true"
        filename="hehehe"
        :paginate-elements-by-height="1100"
        :pdf-quality="2"
        pdf-format="a4"
        pdf-orientation="portrait"
        pdf-content-width="800px"
        :manual-pagination="false"
        ref="html2Pdf"
    >
    <section slot="pdf-content">
    <table>
      <thead>
       <th></th>
      </thead>
    </table>
</table>
</vue-html2pdf>

mohammadmrd74 avatar Jan 11 '21 07:01 mohammadmrd74

hmm

        :paginate-elements-by-height="1100"
        :pdf-quality="2"
        pdf-format="a4"
        pdf-orientation="portrait"
        pdf-content-width="800px"
        :manual-pagination="false"
        ref="html2Pdf"
    >
    <section slot="pdf-content">
    <table>
      <thead>
       <th></th>
      </thead>
    </table>
</table>

<------Please add this like below----->
</section>
</vue-html2pdf>

Please add the </section>, then try again

kempsteven avatar Jan 11 '21 10:01 kempsteven

yeah I forgot to write that down in my issue. I did this and still it doesnt work

mohammadmrd74 avatar Jan 13 '21 05:01 mohammadmrd74