Skip to content

pageSize.width & pageSize.height are undefined #1888

@xellafe

Description

@xellafe

Are you using the latest version of jsPDF?
jsPDF 1.4.1

Have you tried using jspdf.debug.js?
Yes

Steps to reproduce
Create a new jsPDF instance and try to access internal.pageSize.width/height. They are undefined/NaN.
Example: jsbin

What I saw
pageSize.width & pageSize.height are undefined

What I expected
pageSize.width & pageSize.height should contains the actual page values.

Note:

  • Using pageSize.getWidth()/pageSize.getHeight()works, but Typescript will marks it as an error and prevent angular 2+ from compile correctly. Example
  • In 1.3.5 all works correctly

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