-1

Can you please help me with this? function doPrint(){

  var doc = new jsPDF();
            var specialElementHandlers = {
                '#editor': function(element, renderer) {
                    return true;
                }
            };
            doc.fromHTML($('#IDBodyHike'), 15, 15, {
                'width': 170,
                'elementHandlers': specialElementHandlers
            });
            doc.addHTML($('#IDBodyHike'), function() {
                doc.save('sample-file.pdf');
            });

} }

body onload="doPrint();" >

1 Answers1

0

The PDF at http://beta.iamgds.com/HikeTicketDownload.aspx?PNR=107400664-1251138&TicketNo=5017183648 is essentially a screenshot of the browser view of the HTML (i.e. just an image, it doesn't have text in it in the way that a normal PDF does).

As such, different devices have a slightly different view of the content (due to different resolutions etc). And thus the pdf file has a different size.

mjwills
  • 23,389
  • 6
  • 40
  • 63