Generowanie PDF JS/PHP

0

Witam
Dodałem kod js do generowania pdf z div lecz gdy pobieram plik i otwieram go to robi sie straszny bałagan
Wiecie jak temu zaradzić?

   $(document).ready(function() {
    $('#download').click(function () {
    var pdf = new jsPDF('p', 'pt', 'letter')
    , source = $('#page')[0]
    , specialElementHandlers = {
        '#bypassme': function(element, renderer){      
            return true
        }
    }

    margins = {
        top: 60,
        bottom: 60,
        left: 40,
        width: 522
      };

    pdf.fromHTML(
        source 
        , margins.left 
        , margins.top 
        , {
            'width': margins.width 
            , 'elementHandlers': specialElementHandlers
        },
        function (dispose) {

            pdf.save('Downloaded.pdf');
          },
        margins
      )
    });
        });

0

Pewnie trzeba się przebić przez dokumentacje, mi to wygląda na błędne formatowanie (+ten plugin nie obsługuje class, input value itp.).

1 użytkowników online, w tym zalogowanych: 0, gości: 1