foliojs / pdfkit

A JavaScript PDF generation library for Node and the browser
http://pdfkit.org/
MIT License
9.95k stars 1.16k forks source link

Valign/Align feature not working #1000

Open jwteng opened 5 years ago

jwteng commented 5 years ago

Hi, I am trying to align my image (on the pdf) to the centre as below. But the alignment is not working at all. Please help! My finalqr image is in the format of a buffer.

doc.image(finalqr, { //fit: [parseInt(qrConfig.width), parseInt(qrConfig.width)], scale: 0.26458333, align: 'center', valign: 'center' } );

Thank you so much.

Ali-hd commented 4 years ago

Hi I have the same problem.. did you find a solution??

MythologicalEngineer commented 4 years ago

Also having the same issue. Here is a link to my test project showing the same problem: https://github.com/MythologicalEngineer/test_pdfkit

PhilippeDeSousa commented 4 years ago

@MythologicalEngineer @Ali-hd @jwteng Did any of you find a solution ?

ruucci commented 4 years ago

Any solution ?

Hassaan-Elahi commented 4 years ago

any solution ?

PhilippeDeSousa commented 4 years ago

@Hassaan-Elahi @rdesaideveloper There seems to be no solution to this PR. To be honest, the devs don't seem to be replying to any of the issues.

simsketch commented 3 years ago

That's unfortunate. At the very least they should probably remove this from the docs so it doesn't look like it's possibel to do.

Some workarounds may include