#1
|
|||
|
|||
![]()
I'm creating a template for a customer that allows users to select up to 5 bullets. Based upon the number of bullets they flow to the next frame.
I have that working. In addition to the above, they want to use an image as a bullet. (see attached bullet)Bullet-Red-c12m100y99k3.pdf I'm using the following rule: Code:
if (Field("Bullet 1") != "") return "<graphic file=Bullet-Red-c12m100y99k3.pdf>"+ Field("Bullet 1"); else return "" I deselected return as tagged text & it placed the following in the text box: <graphic file=Bullet-Red-c12m100y99k3.pdf>Bullet Copy. I know that I can use graphic boxes for the bullets & text boxes for the copy (and align them), but some bullets are 1 line & some are 2 lines so the spacing between them will not be uniform. This is why I'm trying to use inline graphic. Also, on 2 line bullets, the bullet needs to display on line 1. I've also attached a PDF showing how the bullets should display. PrintAd-4x4-r1.pdf I hope someone can help me today. |
#2
|
||||
|
||||
![]()
Your code looks good so I'm assuming the location of the bullet file isn't in FP's search path. You could define the path or add the path to FusionPro's search path (under the "Advanced" tab of the composition settings). But perhaps the easiest solution would be to add the file as a resource named "bullet" and change your code to:
Code:
if (Field("Bullet 1")) return Resource('bullet').content + Field("Bullet 1");
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#3
|
||||
|
||||
![]() Quote:
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral 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)}); ![]() |
#4
|
|||
|
|||
![]()
Thanks to both of you!
The updated code you provided did work (I already had a resource named Bullet-Red), so i used that. Now I have 1 more question. The bullet is too big. Is there a way I can scale it or give it a set size? Let me know. Thanks! Traba |
#5
|
|||
|
|||
![]()
Stephen,
This goes along with my last post. I have 2 more questions, so 3 in total: 1.) Size the bullet image 2.) Add space between the bullet & text 3.) Indent line 2 when it wraps I've trying everything in the Tags reference manual but can't get them formatted correctly. Thanks, Traba |
#6
|
||||
|
||||
![]()
Yeah, of course. You can define "width" and "height" properties (both defined in 100ths of a point). If you define one without the other, the missing attribute will be scaled proportionally:
Code:
if (Field("Bullet 1")) return Resource('Bullet-Red').content.replace('/>', 'height="300" />') + Field("Bullet 1");
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#7
|
|||
|
|||
![]()
Thanks so much! That worked perfectly.
I have one more question about this. They have 5 bullets (some are one line & some are two lines) that flow between 2 text boxes that are linked. Right now, I have the 5 bullet rules (like the one you helped me with) and I placed them in box 1 using the text frame settings box. Is there are way to setup the rule so that if there is an even number of bullets it distributes them evenly between the text frames? |
#8
|
||||
|
||||
![]()
Evenly distributing the number of bullets in each column is doable and you only need one rule to do it:
Code:
return [ Field("Bullet 1"), Field("Bullet 2"), Field("Bullet 3"), Field("Bullet 4"), Field("Bullet 5") ].filter(String).map(function(s,p,a) { var res = ''; if (p == Math.ceil(a.length/2)) res += '<p verticalstart="topofcolumn">'; res += Resource('Bullet-Red').content.replace('/>', 'height="300" />') + s; return res; }).join('<br>');
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
![]() |
Tags |
bullet, image, inline |
Thread Tools | Search this Thread |
Display Modes | |
|
|