Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Barcodes

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 27th, 2008, 07:17 AM
Mark Mark is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Cleveland
Posts: 29
Default Barcode rule?

I have a job with delivery point barcode info in the database.
Problem is when I use the "postnet barcode" rule there is a big gap between the frame bars and the 5+checksum codes but not 5+4+deliverypoint+checksum codes.

The "barcode" rule using <zipcode> from the database looks good (no gap) but the post office bounced it and said it had no check digit.

What is the proper rule to use for a deliverypoint barcode with a mix of 12 and six character codes?
Thanks,
Reply With Quote
  #2  
Old October 27th, 2008, 03:52 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,522
Default Re: Barcode rule?

Quote:
Originally Posted by Mark View Post
I have a job with delivery point barcode info in the database.
Problem is when I use the "postnet barcode" rule there is a big gap between the frame bars and the 5+checksum codes but not 5+4+deliverypoint+checksum codes.
I'm not sure the problem can be analyzed just from your description. You can collect up a sample job that demonstrates the problem and send it to Support.
Quote:
Originally Posted by Mark View Post
The "barcode" rule using <zipcode> from the database looks good (no gap) but the post office bounced it and said it had no check digit.
Well, the obvious question is, are you computing the check sum? The template rule gives an option to not include it, but I'm not sure that the barcode is valid without it. I'd just use a simple JavaScript rule. (See below.)
Quote:
Originally Posted by Mark View Post
What is the proper rule to use for a deliverypoint barcode with a mix of 12 and six character codes?
Thanks,
Something like this:
Code:
var barcode_data = Field("Zip") + Field("DeliveryPoint");
return '<f name="AdvPNET">' + MakePostNetBarcode(barcode_data);
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #3  
Old January 23rd, 2009, 02:23 PM
Jordanh Jordanh is offline
Junior Community Member
 
Join Date: Oct 2008
Location: Auburn, CA
Posts: 49
Default Re: Barcode rule?

I tried your code and it adds a zero to the end. Is there any way you can get ride of that zero?


var barcode_data = Field("Zip") + Field("DeliveryPoint");
return '<f name="AdvPNET">' + MakePostNetBarcode(barcode_data);
Reply With Quote
  #4  
Old January 25th, 2009, 09:31 AM
mhilger's Avatar
mhilger mhilger is offline
Senior Contributor
 
Join Date: Aug 2008
Location: Chicago
Posts: 325
Default Re: Barcode rule?

Jordan,

I just replied to another post related to this which might be the solution to what you are seeing. Check out: http://forums.printable.com/showthread.php?p=1077
__________________
--Mark Hilger
Reply With Quote
  #5  
Old April 9th, 2009, 05:53 AM
Mark Mark is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Cleveland
Posts: 29
Default Re: Barcode rule?

Same problem as first post. There is a big gap between the frame bars and the zip portion of the barcode with 5 codes but not 5+4 codes when using Postnet Barcode Rule. Data file has a field for the "delivery point barcode" but no "zipcode" by itself this time.
Gave up and used a mailing machine last time.
__________________
Mark

FusionPro 6.1P1m mac
Acrobat Pro 7,8,9
Mac osX 10.4.11
Reply With Quote
  #6  
Old April 9th, 2009, 09:52 AM
Jordanh Jordanh is offline
Junior Community Member
 
Join Date: Oct 2008
Location: Auburn, CA
Posts: 49
Default Re: Barcode rule?

I have found a solution for this problem and have been using it for a few months now. here is the script that i use.

var barcode_data = Field("ZIP Code") + Field("Delivery Point");
postnet= '<f name="AdvPNET">' + MakePostNetBarcode(barcode_data);
BCode = Left(postnet, Len(postnet)- 2) + ")" ;
return BCode


make sure "treat returned strings as tagged text" is checked.

This rule deletes the extra zero off the end and adds a ")" to complete the barcode.
If you have any questions let me know.
Reply With Quote
  #7  
Old April 21st, 2009, 08:23 AM
Mark Mark is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Cleveland
Posts: 29
Default Re: Barcode rule?

I keep getting an error that the input string can only contain numbers.
Data field has colons at beginning and end of delivery point barcode (to make the barcode frame?) Do I have to go into the excel file and strip them out? Your rule I edited is below.

var barcode_data = Field("DeliveryPointBarcode");
postnet= '<f name="AdvPNET">' + MakePostNetBarcode(barcode_data);
BCode = Left(postnet, Len(postnet)- 2) + ")" ;
return BCode
__________________
Mark

FusionPro 6.1P1m mac
Acrobat Pro 7,8,9
Mac osX 10.4.11
Reply With Quote
  #8  
Old April 21st, 2009, 11:00 AM
Jordanh Jordanh is offline
Junior Community Member
 
Join Date: Oct 2008
Location: Auburn, CA
Posts: 49
Default Re: Barcode rule?

Try this. This will get rid of the colon on each end of your delivery point as well as construct the barcode.

Var1 = Right(Field("YourField1"), Len(Field("YourField1"))-1)
Var2 = Left(
Var1, Len(Var1) -1);

var barcode_data = Field("ZIP Code") + Var2;
postnet= '<f name="AdvPNET">' + MakePostNetBarcode(barcode_data);
BCode = Left(postnet, Len(postnet)- 2) + ")" ;
return BCode


Insert you delivery point field in "YourField1" obviously.
The first two lines will delete the first and last character of that field (which would be those colons if i am understanding you right)

Let me know if it works ok.
Reply With Quote
Old May 14th, 2009, 06:59 AM
Mark
This message has been deleted by mhilger. Reason: dupe post
  #9  
Old May 14th, 2009, 07:02 AM
Mark Mark is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Cleveland
Posts: 29
Default Re: Barcode rule?

Got cut off for some reason:

There is not a "zip code" field in this excel file, so I get an error.
If I put "DeliveryPointBarcode" in I get the error that it can only contain numbers.

Do i need to add zipcode to the excel file?
And if so, do you know an easy way to do that?

Thanks
__________________
Mark

FusionPro 6.1P1m mac
Acrobat Pro 7,8,9
Mac osX 10.4.11
Reply With Quote
  #10  
Old May 14th, 2009, 09:35 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,522
Default Re: Barcode rule?

Quote:
Originally Posted by Mark View Post
Got cut off for some reason:
Please feel free to edit your post instead of starting a new one.
Quote:
Originally Posted by Mark View Post
There is not a "zip code" field in this excel file, so I get an error.
If I put "DeliveryPointBarcode" in I get the error that it can only contain numbers.

Do i need to add zipcode to the excel file?
And if so, do you know an easy way to do that?
Jordanh was just sharing an example from his job with a different data field. Just change the name to your data field, and use a replace to strip the non-numeric characters:
Code:
var barcode_data = Field("DeliveryPointBarcode");
return '<f name="AdvPNET">' + MakePostNetBarcode(barcode_data.replace(/\D/g, ""));
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.