#1
|
|||
|
|||
![]()
I have a business card with two text boxes: TextBoxLeft and TextBoxRight.
TextBoxLeft contains the following fields/rules: - Name - Title 1 - Title 2 - Title 3 - Email Address TextBoxRight contains the following fields/rules: - Address Line 1 - Address Line 2 - City, State Zip Code - Phone Number - Fax Number - Website Regarding TextBoxLeft ... sometimes the titles are so long that the Email Address gets truncated (even with CopyFit). So I want to write a rule that does this: - If all of the text in TextBoxLeft does not fit Move the Email Address field to TextBoxRight - Otherwise, Email Address remains in TextBoxLeft
__________________
-- Eric Carbone IT/Project Manager, MOR Printing Inc. Windows 10 |Adobe Acrobat XI | FusionPro 9 |
#2
|
||||
|
||||
![]()
It's hard to say without seeing the job, but you can probably accomplish what you want by connecting the two text frames into a single flow. Make the first box just big enough to hold the email address if it's one one line, then it will flow to the other box if it doesn't fit. Make sure to turn off hyphenation for the paragraph containing the email address (actually, you probably want it off for every paragraph in this case). You can tweak the results a bit if you replace the hard returns between lines with soft returns (by typing Ctrl-Enter instead of just Enter) and adjusting the Widows setting for the single paragraph.
For a more specific answer, I would need to see the job, or at the very least know what kind of copyfitting you're doing. Are you using full-flow copyfitting, by checking the "Adjust text to fit" box in the Overflow Options dialog? Or are you using per-line copyfitting, by calling CopyfitLine or a similar function?
__________________
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)}); ![]() |
#3
|
||||
|
||||
![]()
If you're doing full-flow copyfitting, you can do some tricks in the OnCopyfit callback rule. For instance, you can have the text completely move to another frame if it doesn't fit, like so:
Code:
if (FusionPro.Composition.CurrentFlow.name == "TextBoxLeft") { if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72))) { ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name); FusionPro.Composition.CurrentFlow.content = ""; FindTextFrame("TextBoxRight").content = FusionPro.Composition.CurrentFlow.originalContent; } } Code:
FindTextFrame("TextBoxLeftAlt").suppress = true; FindTextFrame("TextBoxRightAlt").suppress = true; Code:
if (FusionPro.Composition.CurrentFlow.name == "TextBoxLeft") { if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72))) { ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name); FindTextFrame("TextBoxLeft").suppress = true; FindTextFrame("TextBoxRight").suppress = true; FindTextFrame("TextBoxLeftAlt").suppress = false; FindTextFrame("TextBoxRightAlt").suppress = false; } }
__________________
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
|
|||
|
|||
![]()
Hi Dan,
I like your first idea - moving all of the text from the left frame to the right frame. However in my scenario, I only want to move one FIELD (Email Address) from the left text frame to the right text frame. So, I tried out your second idea: 1. Create 2 left text boxes and 2 right text boxes 2. OnRecordStart, suppress TextBoxLeftAlt and the TextBoxRightAlt 3. OnCopyfit, if things don't fit in TextBoxLeft, suppress the nominal frames and show the alternate ones I am pretty sure I did this correctly, but when I preview the template in Acrobat, I see the content in all 4 frames. The TextBoxLeft text box has the solid red line at the bottom (the visual indicator that the text is not fitting), so I would have expected the two nominal boxes to be suppressed. But they're not. Any ideas?
__________________
-- Eric Carbone IT/Project Manager, MOR Printing Inc. Windows 10 |Adobe Acrobat XI | FusionPro 9 |
#5
|
||||
|
||||
![]() Quote:
You may need to modify the OnCopyfit rule to this: Code:
if (FusionPro.Composition.CurrentFlow.name == "TextBoxLeft") { if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72))) { ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name); FusionPro.Composition.CurrentFlow.content = ""; FindTextFrame("TextBoxRight").suppress = true; FindTextFrame("TextBoxLeftAlt").suppress = false; FindTextFrame("TextBoxRightAlt").suppress = false; } }
__________________
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)}); ![]() |
#6
|
|||
|
|||
![]()
Hi Dan,
Thanks for the quick reply. The error log says: Code:
Job started 17:02:06 - 1459458126. Creator: FusionPro(TM) VDP Designer 9.3.21 Composing record #1, input record 6 OnCopyfit, line 6: warning: Could not copyfit text in flow TextBoxLeft The amount of text inserted into a flow exceeds the depth of all frames in the flow <TextBoxLeft>. Text is truncated. Text does not fit in the last frame on page 1 at (0.22, 0.72). Job ended 17:02:07 - 1459458127. Total Job Time: 1s
__________________
-- Eric Carbone IT/Project Manager, MOR Printing Inc. Windows 10 |Adobe Acrobat XI | FusionPro 9 |
#7
|
||||
|
||||
![]() Quote:
You could try to just set the contents of the right frame to nothing instead of suppressing it: Code:
FindTextFrame("TextBoxRight").content = ""; There are other possible solutions as well. Anyway, I've attached a sample job which seems to do what you want. Place it in the Cellphone Tutorial folder and compare the preview of records 1 and 2.
__________________
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)}); ![]() |
#8
|
|||
|
|||
![]()
I tried
Code:
FindTextFrame("TextBoxRight").content = ""; I can't figure it out and I've been at it off and on all day today. I'll try again some more tomorrow. Thanks for your help Dan.
__________________
-- Eric Carbone IT/Project Manager, MOR Printing Inc. Windows 10 |Adobe Acrobat XI | FusionPro 9 |
#9
|
|||
|
|||
![]()
Dan,
I deleted all of the text boxes, recreated them and now the rule is working. Thanks a ton for your help!
__________________
-- Eric Carbone IT/Project Manager, MOR Printing Inc. Windows 10 |Adobe Acrobat XI | FusionPro 9 |
![]() |
Tags |
copyfit, onrecordstart, textbox measure |
Thread Tools | Search this Thread |
Display Modes | |
|
|