Skip to content

(module:context2d.js) getPagesByPath still adds pages to pdf when autoPaging is set to false #3857

Open
@DiamondMofeng

Description

@DiamondMofeng

When a pattern crosses a page, this also lets what is drawn afterward go to the next page

var doc = new jsPDF();

const ctx = doc.context2d
ctx.autoPaging = false

ctx.strokeRect(0, 200, 100, 100);

ctx.fillText("This line should be on the first page.", 0, 100)

Image

var doc = new jsPDF();

const ctx = doc.context2d
ctx.autoPaging = false

// ctx.strokeRect(0, 200, 100, 100);

ctx.fillText("This line should be on the first page.", 0, 100)

Image

Expected behavior

Do not call getPagesByPath when ctx.autoPaging is set to false
(move the call into the if (this.autoPaging) { block)

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