Jump to content

intelligent barcode


Laura Holcombe

Recommended Posts

FusionPro Method:

 

Intelligent Mail Barcode script for users parsing data with mailing software.

 

First create an "Empty" Text Rule,i.e."Create Rules>>New Empty".

Click the box for "Treat Return Strings As Tagged Text".

Give the Rule an identifiable name, which will be selectable in the "Variable" drop window of the text frame where this

information will appear.

 

Then paste this script(Make sure the field name matches your data file):

 

var onecode = Field("Intelligent Mail Barcode"); //Replace "FATD" with Field("Intelligent Mail Barcode")

onecode = onecode.replace(/F/g,"0"); // replaces all F with 0

onecode = onecode.replace(/A/g,"1"); // replaces all A with 1

onecode = onecode.replace(/T/g,"3"); // replaces all T with 3

onecode = onecode.replace(/D/g,"2"); // replaces all D with 2

 

return onecode;

 

 

Then insert the Rule name into the text variable where the barcode will appear. Apply the "IDAutomation4State" font.

 

-regards,

 

Alex Marshall

Application Support

Printable Technologies Inc.

http://www.printable.com

Link to comment
Share on other sites

  • 1 month later...

We were having this exact issue. Thanks for the fix.

 

I do have one question though.

 

Is there a way to store this code as a reusable rule, so you don't have to start from scratch every time you need to use an IMB? For us this would be every time we use FP.

Link to comment
Share on other sites

Great question! Rules can indeed be imported from other FusionPro jobs.

From the menu in Acrobat, select FusionPro -> Data Definition -> Wizard,

and click "Import a data source from another document." You can then

select a .def (Data Definition) file from another job, and it will bring

over all the rules. However, it's all-or-nothing; you can't select

individual rules to import. But you can always import all the rules and

then delete the ones you don't want.

Yes, you'll still have to remember which job contains the rule(s) which

you want to import. (But you would still have to do this even with an

"Import Rule" GUI.) One way around this is to make one job with all

your commonly-used rules and export a "Master Data Definition" to import

when creating new jobs.

If you have logic that's shared between, or common to, multiple jobs, I

can recommend several approaches:

1. Use the "Import data source" feature, as described above, to import

complete rules (along with Globals and resources).

2. Copy-and-paste individual rules' syntax from one job to another.

(You can also create a text file with commonly-used rules, which you can

copy from.)

3. Put your shared logic into functions in the JavaScript Globals, then

you can copy-and-paste the entire Expressions of the Globals from one

job to another.

4. Create a .js file in the Plug-ins folder on your machine, and call

its functions from your rules.

5. Create a .js file in a shared network location and use the Load

function to import its functions into your jobs.

6. Modify the RuleTemplates.English.js file to add your own templates,

as described in the Rules Editor Reference Guide.

Link to comment
Share on other sites

  • 3 months later...
Brad's solution works well when outputting to pdf, but the Truetype version on the Mac causes problems for some other output streams. Here's hoping Printable will someday supply a good Mac Type 1 version of the IMB font like they do with Postnet. I've seen some forum users who have just purchased it from a 3rd party, but the pricing I saw was around $200 - ouch!
Link to comment
Share on other sites

6. Modify the RuleTemplates.English.js file to add your own templates,

as described in the Rules Editor Reference Guide.

 

Hmm. What if I can't find the RuleTemplates.English.js file on my HD? I've used Spotlight, and browsed to Macintosh HD: Applications: Printable: FusionPro (Mac) per the RulesSystemGuide.pdf.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...