Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted alignment of i-text when rendering them with node-canvas #2435

Closed
konkissner opened this issue Aug 21, 2015 · 0 comments
Closed

Corrupted alignment of i-text when rendering them with node-canvas #2435

konkissner opened this issue Aug 21, 2015 · 0 comments

Comments

@konkissner
Copy link

To generate a printable PDF on my nodejs server, i have to move all objects depending on their position on the printsheet:

canvas.loadFromJSON(printPageCanvas, function() {
  canvas.renderAll();

  fs.writeFile(
    test.pdf, canvas.nodeCanvas.toBuffer(), function(err) {
      //done
    });
}, function(o, object) {
  //move all objects of page to the position of the page relative to the printpage.
  object.set(
    {
      left: object.left + object.printPageMargin
    }).setCoords();
});                    

When rendering the objects without moving them (in the browser), the i-text elements with fontAlignment = "center" are displayed correctly:
bildschirmfoto 2015-08-21 um 12 04 37

When moving them on the canvas, the alignment and font-styling is corrupted:
bildschirmfoto 2015-08-21 um 12 01 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants