BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
14.47k stars 1.83k forks source link

Image orientation not respected when exporting to PDF #4875

Open TylerJMcLean opened 4 months ago

TylerJMcLean commented 4 months ago

Describe the Bug

Similar to #1854 I believe that the orientation data for the image is not being respected when exporting to PDF. Since the fix was applied, my images show up in the correct orientation on Bookstack itself. But when I export, it reverts to the previous behaviour of ignoring the rotation

In bookstack bookstack_i1

Export to PDF bookstack_i2

Steps to Reproduce

  1. Create a document with an image in Bookstack
  2. Save the document
  3. Export to PDF
  4. Open PDF

Expected Behaviour

Image should have the same orientation as shown on the site

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v23.12.3

ssddanbrown commented 4 months ago

Thanks for reporting @TylerJMcLean, Will be related to the upstream issue here: https://github.com/dompdf/dompdf/issues/2456

As a workaround, if needed, you could rotate the image via an image editing app (GIMP, Photopea etc...) so that the image itself is fully orientated (Rather than orientated via EXIF metadata).

TylerJMcLean commented 4 months ago

Thanks @ssddanbrown for the quick response. I will do that until this is fixed.

As a side thought, it's pretty weird that some phones save it that way even when taken in portrait orientation.