Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 9th, 2009, 08:02 AM
ijanovick ijanovick is offline
Junior Community Member
 
Join Date: Sep 2008
Location: San Diego, CA
Posts: 12
Default Widows

I have a variable text box that is attached to a csv file. Every record of text is a different length and I am having a problem with widows on the last line of text. Does anyone know how to get rid of this? If I go into my text editor there is a "widow" feature in paragraph formatting, but no matter what number I plug in, it doesn't change anything. I have talked to support about this and they said that the "widow" feature does not apply if my text is coming from a csv file. Why have a feature that doesn't work for variable data? Isn't that the point of the software? Or maybe I am just doing it completely wrong? Any help would be greatfull, thank you.

Isabella Janovick
Reply With Quote
  #2  
Old January 9th, 2009, 10:06 AM
mhilger's Avatar
mhilger mhilger is offline
Senior Contributor
 
Join Date: Aug 2008
Location: Chicago
Posts: 326
Default Re: Widows

Hello Isabella,

The Widows feature in FusionPro is for controlling the number of lines of text that are to be kept together in a given frame. This feature applies to when you are using text overflow.

Here's an example. Suppose you have 2 frames that are connected (so text can overflow from frame 1 to frame 2). In the first frame, you specify a multi-line flow of text. You set Widows to 3.

Now you preview this job and you see that frame 1 has 4 lines of text from your text flow (until there is no more room in frame 1) and then the rest of your text overflows to frame 2.

Next, you go back into your frame 1 with Edit Text and set the Widows to 5.

When you preview the job now, you see that NO text appears in frame 1 and it all has been overflown to frame 2. FusionPro basically said "I was asked to keep 5 lines of text together at a minimum for this flow and there was not enough room to do that in frame 1. Therefore, I overflowed all the text to frame 2".

This all being said on how widows function in FusionPro, I'm not sure this is the capability you are looking for.

When you say that are "...having a problem with widows on the last line of text.", are you referring to:

1) That last line of text overflowing to another frame when you don't want it to?

2) Your last line of text in the paragraph has too few words in it for your liking (maybe you want to make sure there are no fewer than 3 words on the last line)?

Or perhaps it's something else?

Thanks, Isabella
__________________
--Mark Hilger
Reply With Quote
  #3  
Old January 9th, 2009, 11:16 AM
ijanovick ijanovick is offline
Junior Community Member
 
Join Date: Sep 2008
Location: San Diego, CA
Posts: 12
Default Re: Widows

Thank you for the explanation, that helps. And yes, #2, the last line of text in the paragraph has too few words for my liking, which is one (a widow) . I just want it to have a minimum of two words. Is that possible? Thanks again for your help.

Isabella
Reply With Quote
  #4  
Old January 9th, 2009, 12:26 PM
mhilger's Avatar
mhilger mhilger is offline
Senior Contributor
 
Join Date: Aug 2008
Location: Chicago
Posts: 326
Default Re: Widows

Isabella,

We do not have a feature for this capability but there is likely something that can be done with a rule.

When you reach this condition, where the last line in your flow of text is only 1 word, what would you like to do? Perhaps shrink the text (decrease pointsize) of the text in that flow until the last line of text in the paragraph has more than 1 word in it? (meaning the single word on last line would become the last word of the line above).

Or was there something else you would like to see happen to the text when this condition occurs?

Fair warning that this type of logic might be some moderately complex custom copyfit logic in JavaScript...
__________________
--Mark Hilger
Reply With Quote
  #5  
Old August 5th, 2009, 11:40 AM
mclisa81 mclisa81 is offline
Regular Contributor
 
Join Date: Oct 2008
Location: Manchester CT
Posts: 97
Default Re: Widows

Hi Mark,

I found this post and there wasn't an answer, and one of my questions matches the question in the post. I acually have 2 questions, if #1 can be answered, then #2 doesn't won't matter. I'll attach a pdf for clarity.

1) When I enter a hard return to bring a word down onto another line I get a < p > instead of a return. I an using hard returns elsewhere in my template and they work fine. I'm assuming it has to do with having the "treat returned strings as tagged text on" for the rule. If there's a way around this, I'm interested.

Here's my rule

Code:
var text =  Field("QuoteCopy2")
var text2 = Field("Quotedby2")
 
return '<p findent=0 lindent=1930 rindent=1550 tabstops="0;1550,Left;"><f name="Berkeley Book"><z newsize=45><subscript>&ldquor;</subscript><f name=BerkeOldStyItcTMed><z newsize="11.5"><leading newsize="160"><tracking newsize="-1">' + 
       NormalizeEntities(text) +
       '<p quad=R rindent=0 leading=1><f name="Berkeley Book"><z newsize=45></tracking><subscript>&rdquor;</subscript>' + 
       '<p quad=R rindent=1550 leading=160><f name="Frutiger 55 Roman"><z newsize=10>' + NormalizeEntities(text2);
2) I do not want a widow on the last line of the quote. There needs to be 2 words minimum. I do not want to copyfit the line (by bringing the widow up to make 1 line). I would want the last word from the previous line brought down.

Any help would be appreciated
Attached Files
File Type: pdf linebreak.pdf (70.5 KB, 31 views)
Reply With Quote
  #6  
Old June 17th, 2010, 02:50 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,305
Default Re: Widows

Quote:
Originally Posted by ijanovick View Post
Thank you for the explanation, that helps. And yes, #2, the last line of text in the paragraph has too few words for my liking, which is one (a widow) . I just want it to have a minimum of two words. Is that possible? Thanks again for your help.
This isn't what FusionPro means by a "widow." FusionPro's definition of a "widow" is a line or two of text flowed from a previous column or frame, not a word or two that happens to be the last line of a paragraph in a single frame.

However, you can use this code to prevent the last word from being on a line by itself:
Code:
  return TaggedTextFromRaw(Field("YOUR FIELD NAME")).replace(/(.*)(\s)(.+)$/, "$1&nbsp;$3");
And you need to check the "Treat returned strings as tagged text" box.
__________________
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)});

Last edited by Dan Korn; June 17th, 2010 at 02:56 PM..
Reply With Quote
  #7  
Old October 20th, 2015, 10:05 AM
Grizzly Team Grizzly Team is offline
Forum n00b
 
Join Date: Apr 2013
Posts: 4
Default Re: Widows

Quote:
Originally Posted by Dan Korn View Post
This isn't what FusionPro means by a "widow." FusionPro's definition of a "widow" is a line or two of text flowed from a previous column or frame, not a word or two that happens to be the last line of a paragraph in a single frame.

However, you can use this code to prevent the last word from being on a line by itself:
Code:
  return TaggedTextFromRaw(Field("YOUR FIELD NAME")).replace(/(.*)(\s)(.+)$/, "$1&nbsp;$3");
And you need to check the "Treat returned strings as tagged text" box.
Is there anyway to use this code, but still have carriage returns work in multi-line inputs?
Reply With Quote
  #8  
Old October 20th, 2015, 11:08 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,305
Default Re: Widows

Quote:
Originally Posted by Grizzly Team View Post
Is there anyway to use this code, but still have carriage returns work in multi-line inputs?
I don't understand the question. To exactly what "multi-line input" are you referring? Some kind of web form entry, in MarcomCentral or another web app?

Do you have an example of something that's not working the way you expect?
__________________
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
  #9  
Old October 20th, 2015, 11:40 AM
Grizzly Team Grizzly Team is offline
Forum n00b
 
Join Date: Apr 2013
Posts: 4
Default Re: Widows

Sorry, I should have been more specific. I am using the "widow rule" in the post above to prevent single words on the last line of a multi-line input in a Web DataCollect template.

However, when a carriage return is entered in the field on the template the carriage returns show as "<br>".

I hope that makes sense, I apologize, I'm rather new to coding as well as Fusion Pro.

Thanks.
Reply With Quote
  #10  
Old October 20th, 2015, 12:48 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,305
Default Re: Widows

Quote:
Originally Posted by Grizzly Team View Post
Sorry, I should have been more specific. I am using the "widow rule" in the post above to prevent single words on the last line of a multi-line input in a Web DataCollect template.
...in a Web DataCollect template where the web form is being filled out by an end user in...what web application exactly? EFI Digital StoreFront (DSF)? A custom app? Something else?
Quote:
Originally Posted by Grizzly Team View Post
However, when a carriage return is entered in the field on the template the carriage returns show as "<br>".
The rule assumes that the data field does NOT already contain markup tags. If you want it to handle both flat-file data without tags (such as what's typically in a tab-delimited or CSV file used at design time in FP Creator) and with tagged markup data (such as what's being returned from your WebCollect form, presumably from DSF or some other web application which you have still not specified, for an FP Server composition), then you can use the TaggedDataField function, like so:
Code:
return TaggedDataField("YOUR FIELD NAME").replace(/(.*)(\s)(.+)$/, "$1&nbsp;$3");
This may not be foolproof, however, as the rule will replace the last space in the the entire tagged markup data field value. That last space is probably an actual space in the text, but it could be a space that's part of a markup tag, such as the space before an attribute.
__________________
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
Old February 1st, 2016, 08:34 AM
dreimer
This message has been deleted by dreimer.
Old February 1st, 2016, 08:35 AM
dreimer
This message has been deleted by dreimer.
Old April 8th, 2016, 11:17 AM
dreimer
This message has been deleted by dreimer.
Old April 8th, 2016, 11:32 AM
dreimer
This message has been deleted by dreimer.
Old April 8th, 2016, 11:43 AM
dreimer
This message has been deleted by dreimer.
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:22 AM.


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