purduehackers / passport-issuing-office

🛂 Design your passport & register for passport assembly ceremonies.
https://passports.purduehackers.com
4 stars 3 forks source link

save a step attempt #26

Closed MatthewStanciu closed 9 months ago

MatthewStanciu commented 9 months ago

Closing this without merging. Hopefully someone can figure it out.

The approach I'm taking to solve #25 currently involves calling satori to generate the data page, then positioning the rotated image on the 8.5x11-shaped frame. This gives the desired effect, but it's an inefficient way to go about it when you could just generate the image from satori rotated, thus saving a call to satori.

The problem: while the passport design in Figma is 472 x 332, the actual dimensions on the 8.5x11 frame are 475.86 x 324.63. The approach I merged works because I generate the image as 472x332 and then slightly squish it, which is effectively what I do when I make the prototypes in Figma. But I can't figure out the correct dimensions such that the image looks correct when I try to generate it directly via Satori.

I'm shipping without this optimization, but making this PR to have a record for myself or anyone else in the future who wants to take another crack at it.

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
passport-data-pages ✅ Ready (Inspect) Visit Preview Feb 8, 2024 10:28pm