Sorry, I didn't notice that the thread moved here from the web-to-print
forum.  Or at least I didn't get the original message on this forum.
For those of you who have no idea what we're talking about, I've pasted
both the original request and my suggested solution below.

Dan


-----Original Message-----
From: Nicola DosSantos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 23, 2008 2:39 PM
To: Web To Print Users Forum
Subject: [pti_web_to_print] Suggestions on how to create a complex
layout

Hello Everyone,

I need to create a template that was developed with very complex layout 
rules and I'm not sure if it can be done in Fusion Pro, so I was hoping 
if anyone had any suggestions on how I could get this to work....

The product is a letterhead. There is a gray line that runs horizontally

across the top of the letterhead sheet. The length, stroke weight, and 
placement of the line is static. There is a variable text paragraph with

contact information that prints directly beneath the horizontal gray 
line. The variable text paragraph is made up of 8 variable text fields 
(Name, Title, Address, Building, City, State, Zip, Phone). Most of these

variable fields are optional. When all of the fields are used the 
paragraph results in 5 lines of text. When the minimum number of 
variable fields are used the paragraph results in 2 lines of text. Here 
is where I'm unsure how to proceed. The variable text paragraph is Flush

Left. However the last or furthest right character on the longest line 
of text within the paragraph must always align with the right edge of 
the gray line. So that even though the paragraph is Flush Left, the 
location where the flush left edge is moves.

I see this as creating two issues that need to be solved, If anyone can 
see any others please let me know what you think. First I'll need to 
find a way to determine where the furthest right character is within the

paragraph and on which line it falls. Second I would need to find a way 
to move the flush left edge.

When we typeset this letterhead in InDesign we type the information and 
then we move the left edge of the graphic frame until we can see that 
the furthest right character on the longest line is aligned with the 
right edge of the gray line. I know that in FusionPro we cannot move a 
variable frame using javascript.

Any suggestions on how to achieve this would be greatly appreciated. 
Thanks in advance. I apologize if my explanation is at all confusing.

-- 
Nicola DosSantos

Ambit Press / Minuteman Press of Cambridge
Five Cambridge Center
Cambridge, MA 02142
Tel: 617.876.3688 
Fax: 617.876.3896 
www.ambitpress.com

Please send all jobs to [EMAIL PROTECTED]


-----Original Message-----
From: Dan Korn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 23, 2008 4:12 PM
To: Web To Print Users Forum
Subject: [pti_web_to_print] RE: Suggestions on how to create a complex
layout

This isn't really specific to FusionPro Web, so it should probably be on
the other forum, but....

I was just looking at a job like this the other day.  Here's what I did:

1. Put all the lines of text, with the fields, in a text frame, and
select "Suppress if empty" (or "Suppress if containing empty
variables"), as usual  for a business-card-type job where some of the
fields are optional.

2. Give a name to the frame in question, in the box at the top of the
Text Frame palette.

3. Enable Copyfit for the frame (from the Text Frame palette, click the
Overflow button, then click "Adjust text to fit").

4. Get the effective width of the text frame, in points (72 points per
inch).  The easiest way to do this is to set the Units in your Acrobat
Preferences to Points, then read the value in the "W" box on the text
frame palette.  Remember to subtract two times the sum of any border
width and horizontal text inset in effect on the frame to get the
effective text column width.

5. Go into the Rules dialog and edit the OnCopyfit rule, replacing its
syntax with the syntax below.

6. In the OnCopyfit rule syntax, replace the name of the frame on the
first line with the name you assigned to the frame in step 2.  Replace
the value on the third line with the width of the frame from the
previous step, in hundredths of points.  (Take the width in points from
step 4 and multiply by 100.)

You will also need to make sure that the text in the frame has no other
indents set.

Here is the OnCopyfit rule syntax:

  if (FusionPro.Composition.CurrentFlow.name == "Indented")
  {
    var FrameWidthHundPts = 14400; // 2 inches * 7200
    var TM = new FusionProTextMeasure;
    TM.maxWidth = FrameWidthHundPts;
    var error = TM.CalculateTextExtent(
          FusionPro.Composition.CurrentFlow.content);
    if (error)
    {
      Print(TM.messages);
      return;
    }
  
    var LongestLineWidthHunPts = TM.textWidth;
    var IndentHundPts = FrameWidthHundPts - LongestLineWidthHunPts;
  
    var NewContent = FusionPro.Composition.CurrentFlow.content;
    NewContent = ReplaceSubstring(NewContent,
            'findent="0"', 'findent="' + IndentHundPts + '"');
    NewContent = ReplaceSubstring(NewContent,
            'lindent="0"', 'lindent="' + IndentHundPts + '"');
    FusionPro.Composition.CurrentFlow.content = NewContent;
    return;
  }

  if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72)))
      ReportWarning("Could not copyfit text in flow " + 
                    FusionPro.Composition.CurrentFlow.name);

I can send you a sample job with this working if you want, but it should
work in any job as long as you provide the correct frame name and width.

Dan


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to