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

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 20th, 2012, 06:46 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Apply Point Size In Rule

I want to create an IMB Rule and place it into the RulesTemplate.English.js file and not have to assign the point size every time. So I would like to have that set in the Template rule. I know this is probably simple but, just not able to figure it out, below is my code and I want to assign the point size of 16. Thanks.

Code:
return '<f name="USPSIMBStandard">' + Field("Intelligent Mail barcode")
__________________
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
  #2  
Old November 20th, 2012, 07:54 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Apply Point Size In Rule

Code:
return '<f name="USPSIMBStandard"><z newsize="16">' + Field("Intelligent Mail barcode");
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old November 20th, 2012, 07:57 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Apply Point Size In Rule

Perfect thanks step. I promise I will continue to try and remove the novice from my signature!!!!
__________________
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
  #4  
Old November 20th, 2012, 08:22 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Apply Point Size In Rule

Actually, it works for the one off job, but now I need to figure out how to add it to the RulesTemplate.js file. Not cooperating right now.

Got it, some simple little differences in the rule editor and the .js file can be annoying.
__________________
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

Last edited by dreimer; November 20th, 2012 at 09:06 AM.. Reason: Update
Reply With Quote
  #5  
Old November 20th, 2012, 09:15 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Apply Point Size In Rule

Paste this into the js file:

Code:
FusionPro.RuleTemplates["IMB"] =
{
  description:
    "Returns formatted IMB Field",
  syntax:
    "// Change field name to match your data.\n" +
    "return \'<f name=\"USPSIMBStandard\"><z newsize=\"16\">\' + Field(\"Intelligent Mail barcode\");"
    + "\n",
  istext:1,
  isgraphic:0
}
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn

Last edited by step; November 20th, 2012 at 10:27 AM..
Reply With Quote
  #6  
Old November 20th, 2012, 09:18 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Apply Point Size In Rule

Thanks for that step, but I have already figured it out and have it set to always use the same field name since it will always be the same field coming in from my presorting software used to create the IMB.
__________________
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
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 11:54 PM.


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