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

Image orientation not respected when exporting to PDF #4875

Open
TylerJMcLean opened this issue Feb 27, 2024 · 6 comments
Open

Image orientation not respected when exporting to PDF #4875

TylerJMcLean opened this issue Feb 27, 2024 · 6 comments

Comments

@TylerJMcLean
Copy link

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
Copy link
Member

Thanks for reporting @TylerJMcLean,
Will be related to the upstream issue here: dompdf/dompdf#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
Copy link
Author

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.

  • Tyler

@abdulmannans
Copy link

Is there any solution to this?

@virtadpt
Copy link

@TylerJMcLean Here's the weird thing: This happens even when the phone that took the picture doesn't put an EXIF tag that causes the image to be rotated. I've got a Samsung Galaxy S23 which doesn't do that (I checked with exiftools), but whenever I take a picture with my phone and add it to a wiki page it's always rotated. Most of the time it's only slightly amusing, but I'm uploading photographs of recipes I'm archiving and it's a huge pain in the butt when it comes to transcribing the text.

@ssddanbrown
Copy link
Member

Just to throw out some other options to work around this:

@ssddanbrown
Copy link
Member

If you've been seeing rotated images outside of just PDF exports (in gallery and in content) then this may have been due to some changes in v24.05 which have been addressed in #5462.

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

No branches or pull requests

4 participants