Go Back   PTI Marketing Technologies User Community > Software-Related Talk > Getting Started

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 10th, 2015, 11:04 AM
rsheldon rsheldon is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Upper Marlboro, MD
Posts: 24
Exclamation USPSIMB Full Service Intelligent Barcode

Good Afternoon All,

I am trying to create a full service IMB using the font USPSIMBCompact. My original attempt to create this barcode was:

var trackingStr = "00" + Field("MAILERID") + Field("SRVTYPEID") + Field("IMBSEQ");
return MakeOneCodeBarcode(trackingStr, Field("Z4, ZIP-4D"), 14);

But my result used the font IDAutomationState. I know this is part of the coding in the return MakeOneCodeBarcode. I then tried to format the font by converting to javascript, as seen in the amended code below:

var Var1 = "00" + Field("MAILERID") + Field("SRVTYPEID") + Field("IMBSEQ");
var Var2 = "Z4, ZIP-4D";
var Var3 = "";
var v_tracking = "5";
var v_font = "USPSIMBCompact.ttf";
var fontTag = false;
var Var4 = "";


if (Var1.length != 20)
ReportWarning("The tracking number is not the correct length of 20 characters in record number " + CurrentRecordNumber() + ".");

if (Var2 != "")
{
if ((Field(Var2).length != 0) && (Field(Var2).length != 5) && (Field(Var2).length != 9) && (Field(Var2).length != 11))
ReportWarning("The routing number is not the correct length of 0, 5, 9, or 11 characters in record number " + CurrentRecordNumber() + ".");
RoutingNum=Field(Var2);
}
else
RoutingNum="";

return '<tracking newsize="' + v_tracking + '">' + MakeIntelligentMailBarcode(Var1, RoutingNum, Var3, fontTag, v_font, Var4) + "</tracking>";

This code works except the font is 10pt and I need it to be 14pt. I do not see where I can change the font size in the code. Also the font USPSIMBCompact does not preview or compose. Any help would be greatly appreciated!

Thanks,
Rob Sheldon
Reply With Quote
  #2  
Old June 10th, 2015, 11:07 AM
rsheldon rsheldon is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Upper Marlboro, MD
Posts: 24
Default Re: USPSIMB Full Service Intelligent Barcode

I apologize, I forgot to mention that I am using a Mac 10.8.5 running Acrobat 10.1.14 with FusionPro 9.1.0
Reply With Quote
  #3  
Old June 10th, 2015, 11:43 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,225
Default Re: USPSIMB Full Service Intelligent Barcode

Quote:
Originally Posted by rsheldon View Post
Good Afternoon All,

I am trying to create a full service IMB using the font USPSIMBCompact. My original attempt to create this barcode was:

var trackingStr = "00" + Field("MAILERID") + Field("SRVTYPEID") + Field("IMBSEQ");
return MakeOneCodeBarcode(trackingStr, Field("Z4, ZIP-4D"), 14);

But my result used the font IDAutomationState. I know this is part of the coding in the return MakeOneCodeBarcode.
Yes. You can call EncodeOneCodeBarcode instead if you want to set the font and point size yourself.
Quote:
Originally Posted by rsheldon View Post
I then tried to format the font by converting to javascript, as seen in the amended code below:
You converted what exactly? The "Intelligent Mail Barcode Rule" XML Template rule?
Quote:
Originally Posted by rsheldon View Post
var Var1 = "00" + Field("MAILERID") + Field("SRVTYPEID") + Field("IMBSEQ");
var Var2 = "Z4, ZIP-4D";
var Var3 = "";
var v_tracking = "5";
var v_font = "USPSIMBCompact.ttf";
var fontTag = false;
var Var4 = "";


if (Var1.length != 20)
ReportWarning("The tracking number is not the correct length of 20 characters in record number " + CurrentRecordNumber() + ".");

if (Var2 != "")
{
if ((Field(Var2).length != 0) && (Field(Var2).length != 5) && (Field(Var2).length != 9) && (Field(Var2).length != 11))
ReportWarning("The routing number is not the correct length of 0, 5, 9, or 11 characters in record number " + CurrentRecordNumber() + ".");
RoutingNum=Field(Var2);
}
else
RoutingNum="";

return '<tracking newsize="' + v_tracking + '">' + MakeIntelligentMailBarcode(Var1, RoutingNum, Var3, fontTag, v_font, Var4) + "</tracking>";

This code works except the font is 10pt and I need it to be 14pt. I do not see where I can change the font size in the code.
It's Var3 in your code (the third box in the original XML Template rule).
Quote:
Originally Posted by rsheldon View Post
Also the font USPSIMBCompact does not preview or compose.
You need to specify the font by its family name, not by its TTF file name. So instead of "USPSIMBCompact.ttf", I think you want just "USPSIMBCompact".

But all of that is way more complicated than what you need. I think all you really need to do is to have a very simple rule like so:
Code:
var trackingStr = "00" + Field("MAILERID") + Field("SRVTYPEID") + Field("IMBSEQ");
return EncodeOneCodeBarcode(trackingStr, Field("Z4, ZIP-4D"), 14);
And then apply the desired font and point size in the Text Editor.
__________________
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
  #4  
Old June 10th, 2015, 11:53 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 457
Default Re: USPSIMB Full Service Intelligent Barcode

If you have control of the data, I use the alpha characters for my IMB and then I can just apply the font to that field in a regular text box. No rule needed.
__________________
Don Reimer - JavaScript Novice

MAC OS 10.12.5 Acrobat XI 11.0.0 FP Creator 10.0.16
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #5  
Old June 10th, 2015, 12:05 PM
rsheldon rsheldon is offline
Junior Community Member
 
Join Date: Sep 2008
Location: Upper Marlboro, MD
Posts: 24
Default Re: USPSIMB Full Service Intelligent Barcode

Thanks Dan,

This works...sometimes you can't see the forest through the trees. Thanks as always for getting me out of a tough spot.
Reply With Quote
Reply

Tags
intelligent mail barcode, uspsimbcompact

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 08:31 AM.


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