0

I have a .ai file which has a layer containing a bunch of nested outline objects (pathItem, compoundPathItems, ClipGroup, etc.). Example - a linear barcode containing rectangular lines with digits below. Is there a way to locate this barcode on the .ai file and read the vetcor image to decode its content ?

2 Answers 2

2

No.

Illustrator sees paths that's all.

It then sees if the path is open or closed and if there's a stroke or fill applied to the path.

Illustrator does not, and has never, "interpreted" or "read" what those paths may comprise. It sees the drawing of a kitten the exact same way as it sees outlined text which makes up the word "kitten".

Illustrator is not capable of "barcode scanning" to determine the code contents. Or interpreting any cognitive meaning from objects.

3
  • thanks @Scott - is there a way then to identify area containing barcodes in an .ai file ? A potential way can be that I have to first maybe pass the .ai file through an image recognition tool -> identify potential areas and then use script to locate the item. I am already feeling it might be far-fetched idea to pursue - any suggestion here is much appreciated
    – user174450
    Jun 13, 2022 at 6:34
  • Scripting isn't really my wheel-house @user174450 :) Illustrator doesn't have any mechanism to find something based upon how it visually may appear. Pure conjecture: You may be able to write a script to find a x number of filled, closed paths which have a greater height than width, and are no more than x distance apart. But I'm honestly guess. Ultimately for anything you'd need to think of how things are constructed not what they may comprise as a cohesive visual - in other words, shapes and not "barcode".
    – Scott
    Jun 13, 2022 at 6:49
  • .. unless, of course, something in the Layers Panel was renamed "barcode". I tend to rename groups or layers so they are easily identified without huge thumbnails.... but that doesn't mean other users do the same.
    – Scott
    Jun 13, 2022 at 7:10
1

Well obviously it would be possible for you to implement this. It wold just be quite a bit of work on the scripting layer. How well it would work depends on how much effort you want to put into it.

But the gist of implementing this is organising the data in such a way that you have a easy time to do this. As said in other answers from a pure programmatic point of view there is no difference between a barcode and anything else in the drawing. I guess youd organize edges by their coplanarity or do some raycasting.

Is it builtin? No. Would it ve useful? Probably for less than 0.1% of users. How much would it cost to have this implemented? Depends a bit how you want it to work but somewhere around 40 manhours for a crappy prototype/hack and 120-200 hours for a decent implementation. So somewhere around 2000-10000€. So now the question is how much is it worth to you?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.