#1
|
|||
|
|||
![]()
I have several rules in a template that is calling out to an XDF file for data. Each one of these are landing in alternating color grids with up to four pieces of text (requirements) in each text block. Each one has a bullet point so you basically have:
Quote:
Quote:
so, is there a way to make it indent if the text in the XDF is so long it spills to another line? here is the code in one of the rules for example: Quote:
|
#2
|
||||
|
||||
![]()
You can format the text inside a <p> tag for hanging indents. Here's a sample using the tab and lindent attributes:
Code:
'<p tabstops="0;1800,Left,,;" lindent=1800>' + "-" + '<t>' + textvariable + '</p>'; |
#3
|
|||
|
|||
![]() Quote:
![]() |
#4
|
|||
|
|||
![]()
The weird problem I am running into is that code is somehow changing the spacing on the rows on the table and not keeping it consistent... thoughts? It's actually making the rows shrink...
The only modification to the original code was the addition of your code like this: Quote:
![]() |
#5
|
||||
|
||||
![]()
What do you mean by making the rows shrink? The leading or the column width? A screenshot would be helpful.
|
#6
|
|||
|
|||
![]() Quote:
Thanks so much for your help! |
#7
|
||||
|
||||
![]()
This looks like a leading issue. You could try turning on "Use Legacy Line Leading" (it's in the Variable Text Editor, Paragraph, Global Settings). Sometime that just fixes everything, sometimes causes other issues though.
Another thing I would do is open up the TagsRefGuid.pdf manual. On page 42 it covers all the Paragraph attributes. You may need to adjust the leadbefore and leadafter. If you try this, I believe the documentation is off about it being in tenths, it seems to actually be in hundredths like lindent is. |
#8
|
|||
|
|||
![]() Quote:
![]() |
#9
|
||||
|
||||
![]() Quote:
That said, you might want to try using "soft" returns, with <br> tags, instead of starting a whole new paragraph with a <p> tag for each item. In fact, it looks like you're already outputting <br> tags between each line, on top of <p> tags, in these lines: Code:
s = AppendText(s, " ", PAC1); s = AppendText(s, "<br>", PAC2); s = AppendText(s, "<br>", PAC3); s = AppendText(s, "<br>", PAC4); Anyway, it's no wonder the spacing is changing, with both <br> and <p> tags in effect. You want to choose one or the other. The simplest way to have the <p> tag attributes take effect without actually starting a new paragraph is to add the "br=false" attribute. So the lines could be like this: Code:
PAC1 = '<p br=false tabstops="0;1250,Left,,;" lindent=1250>' + "•" + '<t>' + PAC1 + '</p>'; Code:
if (PAC1 != "") PAC1 = '<p br=false tabstops="0;1250,Left,,;" lindent=1250>' + "•" + '<t>' + PAC1; if (PAC2 != "") PAC2 = "<br>" + "•" + '<t>' + PAC2; if (PAC3 != "") PAC3 = "<br>" + "•" + '<t>' + PAC3; if (PAC4 != "") PAC4 = "<br>" + "•" + '<t>' + PAC4; Code:
s = AppendText(s, '<p br=false tabstops="0;1250,Left,,;" lindent=1250>•<t>' , PAC1); s = AppendText(s, "<br>•<t>", PAC2); s = AppendText(s, "<br>•<t>", PAC3); s = AppendText(s, "<br>•<t>", PAC4); Code:
var s = '<p br=false tabstops="0;1250,Left,,;" lindent=1250>•<t>'; s += [PAC1, PAC2, PAC3, PAC4].filter(String).join("<br>•<t>");
__________________
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)}); ![]() |
#10
|
|||
|
|||
![]()
Ya, I'm pretty confused
![]() Quote:
![]() Last edited by n2_space; February 6th, 2013 at 04:53 AM.. |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|