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

Problem with detecting Illustrator file #45

Open
markwoon opened this issue Mar 22, 2018 · 4 comments
Open

Problem with detecting Illustrator file #45

markwoon opened this issue Mar 22, 2018 · 4 comments

Comments

@markwoon
Copy link

This Illustrator file (Oxycodone_PK.zip) is not being detected as such.

I'm not quite sure how this file got into this state. I'm guessing that it started life as a PDF file, then got opened in Illustrator, and then saved as an Illustrator file. So this is kind of a corner case...

The property you're keying off of (dc:format) is there, and has the correct value. It just seems to have been moved around a bit.

@markwoon
Copy link
Author

markwoon commented Jul 6, 2018

It looks like like simplemagic is sensitive to the exact location of the property. Moving the property to the top of the file seems to resolve this problem. See
Oxycodone_PK-fixed.zip for an example.

Is there a way to make simplemagic less susceptible to these kinds of problems? Can it read the metadata directly?

@markwoon
Copy link
Author

@j256 Any idea if this can be fixed?

@j256
Copy link
Owner

j256 commented Oct 25, 2018

The problem with these is that this is a zip file. Being able to detect that it contains an Illustrator document requires different processing. I think it needs to be done but I'm not sure when I can get to it. Feel free to submit some code and I'll take a look at it.

@markwoon
Copy link
Author

@j256 I've attached zip files because I couldn't attach the .ai file directly. Please take a look at the Illustrator file in the zip file to test.

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

No branches or pull requests

2 participants