Skip to content

Setting a custom paper size yields a blank page #2452

@sktzofrenic

Description

@sktzofrenic

How to reproduce:

Go to the demo page and do this (http://raw.githack.com/MrRio/jsPDF/master/):

// Don't forget, that there are CORS-Restrictions. So if you want to run it without a Server in your Browser you need to transform the image to a dataURL
// Use http://dataurl.net/#dataurlmaker
var doc = new jsPDF({
  orientation: 'p',
  unit: 'px',
  format: [16, 9.5]
})

doc.setFontSize(40);
doc.text("Octonyan loves jsPDF", 35, 25);
doc.addImage('examples/images/Octonyan.jpg', 'JPEG', 15, 40, 180, 180);

When you set a custom page size, it bugs out and does not work correctly and the page is very very tiny. Even if you bump up the values significantly so you can see the page, no text is rendered and the page is blank.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions