Skip to main content
Lukas Engqvist
Community Expert
Community Expert
December 10, 2009
Question

Adding a barcode to product text based on a productnumber

  • December 10, 2009
  • 1 reply
  • 645 views

I have looked at teacup pluggin patternmaker and it is definately the easiest way to quality control and if necessary update files.
What I miss is the ability, though I would guess it is scriptable to search and replace a series of serial numbers with a specified character style, or with a GREP search, with barcodes (In my case Interleaved 2 of 5 with no Check digit)

(A barcode font would work as well if it can append the barcode on a new line at end of paragraph)

eg.
"1x100 3:99/each 299:00/box
  999999 product information
"

with:

" 1x100 3:99/each 299:00/box
   999999 product information

   "barcode representing 999999" "

I imagine that the barcode would be an anchored object, anchored at the number (in my example 999999 ).

So i would need to figure out a script to copy six digit numbers after a line break,
replace them with an anchored frame and itself
that anchored frame would then need to be filled with a barcode of the copied number with a certain preset.

I don't think I am asking the impossible. But I don't really know where to start. My job is as print service provider and so I am open to outsourcing the develoment of such a script if ther is not a solution for it already.

Sorry for being so overt, please feel free to comtact me off forum for a suggestion

This topic has been closed for replies.

1 reply

Peter Kahrel
Community Expert
Community Expert
December 10, 2009

Marc Autret has an excellent barcode script at http://marcautret.free.fr/geek/indd/eandesign/index.php

Peter

Lukas Engqvist
Community Expert
Community Expert
December 10, 2009

Yes I have seen that script. I have two problems, first is I didn't pay enough attention to my french in school (and seeing his outlines it kindles the geek in me, shame the the understandiing is greek to me ).

Second I want it to be smooth for my coworkers who will be implementing the nitty gritty, and I want it to be workflow proof.  I am sure Marc could modify his script to behave as I would like it but if I am to do it myself i need more guidance.

Most of the barcode scripts depend on a frame being drawn and selected raher than selecting a number string, wich is as I se the natural grammar.

Selected text string (number, or GREP findable string) gives barcode according to configuration at specific anchor point. Where the configuration would include if the selected text is to be replaced or preceded/followed by barcode graphics (as well as size and style of barcode)

Excuse the syntax, been a long 20 years since I typed code and am now much more a user than a programmer.

Peter Kahrel
Community Expert
Community Expert
December 10, 2009

I've seen barcode generators discussed in different forums, I'm sure that you can google yourself into them. Whether they're any good I don't know.

Peter