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

Wrong image rotation on some files with add-image and sign tools #217

Open
paspo opened this issue May 29, 2023 · 4 comments
Open

Wrong image rotation on some files with add-image and sign tools #217

paspo opened this issue May 29, 2023 · 4 comments
Labels
bug Something isn't working Front End good first issue Good for newcomers

Comments

@paspo
Copy link

paspo commented May 29, 2023

In some pdf files, when I put an image with the add-image or the sign tool, I obtain a PDF with the desired image but in a different position, with wrong dimensions and wrong rotation (always 90° ccw).

I can resolve this issue by:

  • opening the original file with LibreOffice Draw and exporting it in PDF without modifications
  • using the pdf repair tool on the original file

There's clearly something wrong with the original files, but I don't have enough data ATM.
I can safely say that this has nothing to do with PDF version (some files are 1.3, others are 1.7 ...)
I can also exclude the image file format: the problem arises with jpegs, pngs...

Even if I understand that the problem is in the "somewhat broken" input files, I think that there's the possibility that solving this issue can lead to a more robust processing.

I can provide some example files to any contributor asking for it, but not publicly; DM if interested.

Thanks.

@Frooodle
Copy link
Member

Frooodle commented May 29, 2023

Can you send me the example file? I am the main contributor and admin of the discord if you want to PM me it there

@paspo
Copy link
Author

paspo commented May 29, 2023

For anyone to try, here's a sample file.
It's a PDF generated by a MFP.
scan258275.pdf

@Frooodle Frooodle added the bug Something isn't working label Jun 4, 2023
@paspo
Copy link
Author

paspo commented Jul 6, 2023

This issue is still present in 0.10.3

@Frooodle Frooodle changed the title Wrong image placing on some files with add-image and sign tools Wrong image rotation on some files with add-image and sign tools Dec 11, 2023
@Ludy87
Copy link
Contributor

Ludy87 commented Apr 7, 2024

The problem is that the orientation of the PDF in your file is 270°, which is where the incorrect ratio calculation comes from and the incorrect aurization of the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Front End good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants