[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: Scaling of graphics in XML documents upon import to FrameMaker



At 07:00 AM 9/10/2004, Mark Barratt wrote:
sverre.ola.medalen@xxxxxxxxxxxxx wrote:

The graphics comes with the attributes "contentwidth" and "contentdepth"
set to a pixel value. As the size of the graphics varies from a width in
the area of 220px and up to 1276px the above scaling rule is not good
enough. The maximum width of a graphic must be 16cm to fit into our
document template.
With the variation in width of the graphics, the rule must scale the
graphics with a width > 16cm down to exactly 16cm width, and the
graphics with a width < 16cm to a width suitable for good readability.

This would be straightforward to do as a preprocessing script in Perl or XSLT (or, presumably, most other script languages). I don't *think* you can do math in read-write rules.


Sverre,
Mark is correct that read/write rules cannot perform calculations. My first choice in this situation would also be a scripting language to create a temporary XML file that is a variation of the original one with the desired width and height set in an impsize attribute.
An alternative is to use a custom FDK client. If your application requires an FDK client for other processing, you might as well do this calculation in the FDK and avoid a script. If you don't need the FDK otherwise, it's probably simpler to use XSLT or PERL as Mark suggested.
--Lynne




Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, and training
lprice@xxxxxxxxxxxx http://www.txstruct.com
voice/fax: (510) 583-1505 cell phone: (510) 421-2284




** To unsubscribe, send a message to majordomo@xxxxxxxxx **
** with "unsubscribe framers" (no quotes) in the body.   **