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

Extract photos from PDF files #1243

Closed
2helium opened this issue Apr 12, 2023 · 10 comments
Closed

Extract photos from PDF files #1243

2helium opened this issue Apr 12, 2023 · 10 comments
Assignees
Milestone

Comments

@2helium
Copy link

2helium commented Apr 12, 2023

Would Keka support extracting photos from PDF files in future? BtterZp had already import this feature and its very useful.

@aonez
Copy link
Owner

aonez commented Apr 12, 2023

This is supported already, just be sure to extract the file instead of compressing it (default).

You can force the extraction using the contextual menu in Finder or by dropping the PDF to the lower section of the Keka window (secondary action).

@aonez aonez added this to the How-to milestone Apr 12, 2023
@aonez aonez changed the title [REQ]Extract photos from PDF files Extract photos from PDF files Apr 12, 2023
@2helium
Copy link
Author

2helium commented Apr 12, 2023

Thank you for the instant reply!
I tried to extract a PDF file by Keka in right-click, but got a error:

Error log OS: 版本13.3.1(版号22E261) (x86_64) Keka: v1.2.61-r5114 (WEB) (Sandboxed) (zh-Hans) Format detected: Unknown Binary used: keka7zz Arguments: ( x, "**my File**", "-o**my file**.kextraction/Operation", "-snld", "-aou", "-xr!__MACOSX", "-xr!.DS_Store", "-xr!.localized", "-xr!._*", "-xr!.FBC*", "-xr!.Spotlight-V100", "-xr!.Trash", "-xr!.Trashes", "-xr!.background", "-xr!.TemporaryItems", "-xr!.fseventsd", "-xr!.com.apple.timemachine.*", "-xr!.VolumeIcon.icns", "-bsp1" )

7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15 : Modified by aone for Keka
64-bit locale=en_US.UTF-8 Threads:8

Scanning the drive for archives:
0M Scan route

1 file, 33802934 bytes (33 MiB)

Extracting archive: my file.pdf
24% Open
ERROR: my file.pdf
Cannot open the file as archive

24%

Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0

Error code 2

@aonez
Copy link
Owner

aonez commented Apr 12, 2023

@2helium does that file contain images? If so can you share it, here or at info@keka.io?

@2helium
Copy link
Author

2helium commented Apr 12, 2023

Hello @aonez
I just make a new PDF from a picture by Preview. It can be extracted by other software, but still can't be extracted by Keka and met a same error. I removed and re-installed Keka but nothing change.
My device :MBP 2018 + macOS 13.3.1
Keka.pdf

@aonez
Copy link
Owner

aonez commented Apr 12, 2023

Thanks for all the feedback @2helium. Indeed it was not working properly, this version should be fixed:
Keka-v1.2.62.r5159

Let me know if that works for you.

@2helium
Copy link
Author

2helium commented Apr 13, 2023

Hello @aonez
The new version works properly with most of PDFs on my device. Thank you for efficient bug fixing!
Here's also a few PDFs that neither Keka nor other software can extract the pics inside. A sample is attached :
Sample.pdf

@aonez
Copy link
Owner

aonez commented Apr 13, 2023

Ok I also got this one fixed in the Keka iOS version, will try to release a test version for macOS tomorrow.

@aonez
Copy link
Owner

aonez commented Apr 13, 2023

@2helium I have found the issue but can you share some more samples that fail so I can properly fix it?

@2helium
Copy link
Author

2helium commented Apr 14, 2023

Hello @aonez
I collected some similar case in my device. They seems from a same database.
Sample 3.pdf
Sample 4.pdf
Sample 5.pdf

@aonez
Copy link
Owner

aonez commented Apr 14, 2023

Thanks again. This is caused by a mismatch in the image file size informed in the PDF. Those images are AES encoded and the size accounts for the AES data and its key and not for the actual image size, that in all those cases is smaller.

I'll try to properly fix this one.

aonez added a commit to aonez/XADMaster that referenced this issue May 5, 2023
@aonez aonez closed this as completed Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants