Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

198
Views
Fabric JS multiple canvases with for each pdf page

Hope you are having a wonderful day :}

so lately I've been trying to create a pdf flipbook page with annotation using PDFJS+TurnJS+FabricJS. But unfortunately i'm stuck with adding canvases for each PDF page.

well the the canvases was a success, but I'm not being able to handle the (new fabric) function for each page.

so if someone can me I would be very thankful..

anyways here's my code:

$(".canvas-page-area").on("click", function () {
    let target = $(this).attr("id");
    $(".canvas-page-area").removeClass("focus")
    $(this).addClass("focus");
    let t2 = $(".canvas-page-area.focus").attr('id')
    var canvas = new fabric.StaticCanvas(t2);
    canvas.setHeight($(".addCanvas").height());
    canvas.setWidth($(".addCanvas").width());
    $("#add").on('click', function () {
        canvas.add(
            new fabric.Rect({
                top: 200,
                left: 200,
                width: 50,
                height: 50,
                fill: '#f55'
            }),
        );
    }) 
})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!