Date and logo HTML form no data when converting into PDF

36 Views Asked by At

I have been looking for hours for a solution with no success. My PDF Image does not grab logo or date field, How can I able to do this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>
    <script>
    function onClick() {
        html2canvas(document.body, {
        onrendered: function(canvas) {

        var img = canvas.toDataURL("image/png");
        var doc = new jsPDF();
        doc.setFontSize(40);
        doc.addImage(img, 'JPEG', -95, -10);
        doc.save('Authorization To Close Account.pdf');
        doc.autoPrint('Authorization To Close Account.pdf');
        }

        });
    };

  var element = document.getElementById("clickbind");
  element.addEventListener("click", onClick);
    </script>

enter image description here

I have tried to change date into string in the input date field, also some JavaScript date addition but they did not work.

1

There are 1 best solutions below

0
Ivonne Aspilcueta On

Fix it. Thank you.

The clear button was blocking my date field so I change the position of my date field and the Image I called it locally instead of an url.

enter image description here