Olivier Posted May 14, 2018 Share Posted May 14, 2018 Hi friends, I have to build a FusionPro template with a text rule to be able to have prices like this : https://www.dropbox.com/s/h6dgisrjhjgmgd0/Capture%20d%27%C3%A9cran%202018-05-14%2010.08.41.png?dl=0 I know how to use the € as a superscript but need help to place the cents bellow the €. Help is more than welcome ! Best regards, Olivier FusionPro 10.0.26 AcrobatPro 10.1.16 InDesign CC2017 MacOS 10.12.6 Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 15, 2018 Share Posted May 15, 2018 It's hard to know exactly what you need to do without seeing at least the data. You could create a table, or use something like a repeatable component. But if the price is always going to be on a fixed position on the page like that, then I think the easiest thing is just to have three separate text frames: One for the integral price, one for the Euro symbol, and one for the cents. You only need two rules to populate the two frames with the parts of the price, something like this: // "Whole" amount var price = parseFloat("$3".replace(/[^\d\.]/g, '')); return Int(price); and: // Cents var price = parseFloat("$3".replace(/[^\d\.]/g, '')); return FormatNumber("00", Math.round((price % 1) * 100)); Or, inject both parts in OnRecordStart: var price = parseFloat("$3".replace(/[^\d\.]/g, '')); FusionPro.Composition.AddVariable("WholePrice", Int(price)); FusionPro.Composition.AddVariable("Cents", FormatNumber("00", Math.round((price % 1) * 100))); Quote Link to comment Share on other sites More sharing options...
Olivier Posted May 22, 2018 Author Share Posted May 22, 2018 Thank you Dan, I did it that way using 2 frames have a great day, Olivier Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.