On Jan 24, 2008, at 8:07 AM, David Sweet wrote:
Place your static line on your page, and a text box aligned flush
right to that line. The text box should be a "set width" that you
are "certain" will be longer than you would ever need for your
largest address. Determine which of the variable text lines is the
longest (by character count or some other type of method), and then
discover what the length of that line-segment is in points (doing
this all in an OnRecordStart rule). Then you could assign a variable
tab setting to that location before you place your address lines
into the text box. The tab setting should then put the longest line
at a point where it "appears" to be flush right to the static gray
line.
You could do that as well. However, the solution I posted earlier is
a bit more automatic. No tab stops are required, and the only thing
the rule has to know is the name and width of the frame.
It would help greatly if someone from Printable could chime in on
this as to whether or not any of the text measuring commands/
functions that are used in the CopyFit or CopyFitLine procedures
would return a value that would measure the width of a text line-
segment and return a length value in points.
Yes, absolutely, that's exactly what the FusionProTextMeasure object
does. I've posted numerous examples of its usage, including my
earlier response in this thread.
Now, there's an important difference between the way that the
FusionProTextMeasure object works and what the OnCopyfit rule does:
FusionProTextMeasure measures a specific bit of text in a
(theoretical) rectangular text frame; you have to tell it what text to
measure, and you also have to either tell it how wide the frame is and
then find out whether it fits on one line (and if not, how many lines/
how much vertical space) the text takes up, OR let it measure how wide
a frame would have to be to hold the text on a single line, without
wrapping.
The OnCopyfit rule, by contrast, in its default mode, measures the
text in an entire flow, and it can count for multiple columns and
frames and runaround and text inset and borders and everything else
that can happen in an actual multi-frame flow. It knows what the
content of the flow is, and just tries different magnifications to
make it fit. So OnCopyfit is much more automatic; however it can't
really do what a FusionProTextMeasure-based function such as
CopyfitLine does, because it deals with the entire flow, not just one
line or paragraph in one frame.
The solution I posted earlier is kind of a hybrid solution that uses
the FusionProTextMeasure object within the OnCopyfit rule, to take
advantage of a kind of back-door that the OnCopyfit rule provides you
to be able to access the properties (specifically the text contents)
of a text flow on a per-flow basis, whereas most other rules can only
do things on a per-record basis.
Entering text after a movable tab is the only way I can think of to
have a left justified section move as a whole to the right. If you
know the length of the longest line (X), and you know the width of a
text box (Y), then a simple subtraction of X from Y should give you
your tab setting T.
My solution used indents instead of tab stops, but both are valid.
You could also create a table and adjust the column widths; there are
other possibilities as well. By using these kinds of techniques, you
can work around the limitations on moving and resizing frames (even
graphic frames) in rules in FusionPro Desktop. (You can also utilize
the Page Usage feature to accomplish limited variable layout.)
Of course, if you're implementing a complex solution where you want to
be able to vary the layout as well as the text contents, in a more
efficient and straightforward way, you should look at FusionPro
Server, which includes a DIF Manipulation API for this very purpose,
as well as other utilities to enable batch composition and job
scheduling, including a separate API which allows you to measure text
in the same way that FusionProTextMeasure does, but inside your own
solution (such as C# or VB.NET code in an ASP.NET web site or service).
You might be asking, why not offer this kind of layout (DIF)
manipulation capability in Desktop as well? Well, one reason (and I
don't think I'm giving away any secrets here) is that we want to keep
some of the more advanced functionality in FusionPro Server, since
it's our Enterprise-level VDP solution. Another reason is that that
kind of programmatic manipulation of the layout breaks the WYSIWYG
model of Desktop. In other words, if you could move your frames
around in JavaScript rules, how would Preview possibly work?
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
--