Hi Chris, Thank you so much for the advise, I didn't know about the intermediate format, I will definitely explore that possibility and see if that can solve my problem. Even though I could write my own utility methods for solving the task the best way to get correct answers is to use the same computations that FOP uses when it produces the PDF.
Best regards/Vänliga hälsningar Daniel Norberg -- [X] Excosoft • Daniel Norberg • Developer • Application Consultant Södervägen 70, SE-183 64 Täby, SWEDEN Cell +46 (0)76-199 31 85 Email [email protected]<mailto:[email protected]> www.excosoft.se<http://www.excosoft.se/> ________________________________ From: Chris Bowditch <[email protected]> Sent: Thursday, May 7, 2026 19:11 To: [email protected] <[email protected]> Subject: Re: Is there a property resolver in the FOP API? Hi Daniel, No such function exists. Take a look at the intermediate format: Apache(tm) FOP: Intermediate Format<https://xmlgraphics.apache.org/fop/trunk/intermediate.html> What you can do is generate the IF XML from the XSL-FO and then you will be able to see the dimensions of everything within the pages. You can then use that information to either alter the original XSL-FO or amend the IF XML before final rendering. I hope that helps Chris ________________________________ From: Daniel Norberg <[email protected]> Sent: 07 May 2026 18:07 To: [email protected] <[email protected]> Subject: Is there a property resolver in the FOP API? Hi, I am developing support for transformation of FO to PDF with FOP using Java. I wonder if there is an API method that I can call that resolves a property? Here is one example: <fo:block font-size="12pt"> <fo:inline font-size="2em">Lorem ipsum</fo:inline> </fo:block> I want to call a method that can resolve the font-size on the <fo:inline> in pt, for instance with a similar code to this: float fontSize = FOP.getDimensionValue(element, "font-size"); Is there such a method available in FOP that I can use, or do I have to write my own code to resolve the value? Best regards/Vänliga hälsningar Daniel Norberg -- [X] Excosoft • Daniel Norberg • Developer • Application Consultant Södervägen 70, SE-183 64 Täby, SWEDEN Cell +46 (0)76-199 31 85 Email [email protected]<mailto:[email protected]> www.excosoft.se<http://www.excosoft.se/>
