Re: Is there a property resolver in the FOP API?
Chris Bowditch <[email protected]> Thu, 7 May 2026 17:11:32 +0000
| Newsgroups | gmane.text.xml.fop.user |
|---|---|
| Message-ID | <DB7PR06MB551405F4AB2C96058F08B99EFB3C2@DB7PR06MB5514.eurprd06.prod.outlook.com> |
--_000_DB7PR06MB551405F4AB2C96058F08B99EFB3C2DB7PR06MB5514eurp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Daniel, No such function exists. Take a look at the intermediate format: Apache(tm)= FOP: Intermediate Format<https://xmlgraphics.apache.org/fop/trunk/intermed= iate.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 us= e 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=3D"12pt"> <fo:inline font-size=3D"2em">Lorem ipsum</fo:inline> </fo:block> I want to call a method that can resolve the font-size on the <fo:inline> i= n pt, for instance with a similar code to this: float fontSize =3D FOP.getDimensionValue(element, "font-size"); Is there such a method available in FOP that I can use, or do I have to wri= te my own code to resolve the value? Best regards/V=E4nliga h=E4lsningar Daniel Norberg -- [X] Excosoft =95 Daniel Norberg =95 Developer =95 Application Consultant S=F6derv=E4gen 70, SE-183 64 T=E4by, SWEDEN Cell +46 (0)76-199 31 85 Email [email protected]<mailto:[email protected]> www.excosoft.se<http://www.excosoft.se/> --_000_DB7PR06MB551405F4AB2C96058F08B99EFB3C2DB7PR06MB5514eurp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1= 252"> <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo= ttom:0;} </style> </head> <body dir=3D"ltr"> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Hi Daniel,</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> No such function exists. Take a look at the intermediate format: <a href=3D= "https://xmlgraphics.apache.org/fop/trunk/intermediate.html" id=3D"OWA80ee2= ed3-53af-5afb-374c-0cb15159e32d" class=3D"OWAAutoLink"> Apache(tm) FOP: Intermediate Format</a></div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> 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 us= e that information to either alter the original XSL-FO or amend the IF XML = before final rendering.</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> I hope that helps</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Chris</div> <div id=3D"appendonsend"></div> <hr style=3D"display:inline-block;width:98%" tabindex=3D"-1"> <div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st= yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Daniel Norberg <da= [email protected]><br> <b>Sent:</b> 07 May 2026 18:07<br> <b>To:</b> [email protected] <[email protected]= e.org><br> <b>Subject:</b> Is there a property resolver in the FOP API?</font> <div> </div> </div> <style type=3D"text/css" style=3D"display:none"> <!-- p {margin-top:0; margin-bottom:0} --> </style> <div dir=3D"ltr"> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> Hi,</div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> I am developing support for transformation of FO to PDF with FOP using Java= .</div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> I wonder if there is an API method that I can call that resolves a property= ? Here is one example:</div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"font-family:"Courier New"= ;,monospace; font-size:11pt; color:rgb(0,0,0)"> <fo:block font-size=3D"12pt"></div> <div class=3D"x_elementToProof" style=3D"font-family:"Courier New"= ;,monospace; font-size:11pt; color:rgb(0,0,0)"> <fo:inline font-size=3D"2em">Lorem ipsum</f= o:inline></div> <div class=3D"x_elementToProof" style=3D"font-family:"Courier New"= ;,monospace; font-size:11pt; color:rgb(0,0,0)"> </fo:block></div> <div id=3D"x_Signature" class=3D"x_elementToProof"> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> 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:</div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> float fontSize =3D FOP.getDimensionValue(element, "font-size");</= div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> Is there such a method available in FOP that I can use, or do I have to wri= te my own code to resolve the value?</div> <div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans= -serif; font-size:11pt; color:rgb(0,0,0)"> <br> </div> <div class=3D"x_elementToProof" style=3D"background-color:rgb(255,255,255);= margin:0px"> <div class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; ma= rgin:0px; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:11pt; c= olor:black"> <span style=3D"background-color:rgb(255,255,255)">Best regards/V=E4nliga h= =E4lsningar</span></div> <div class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; ma= rgin:0px; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:11pt; c= olor:black"> <span style=3D"background-color:rgb(255,255,255)">Daniel Norberg</span></di= v> <div class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; ma= rgin:0px; font-family:Arial,sans-serif; font-size:9pt; color:black"> <b>--</b></div> <div class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; ma= rgin:0px; font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,"Ap= ple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe= UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; co= lor:black"> <b><img></b></div> </div> <div class=3D"x_elementToProof" style=3D"background-color:rgb(255,255,255);= margin:0px"> <div class=3D"x_elementToProof" style=3D"background-color:white; margin:0px= "> <p class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; marg= in-top:0px; margin-bottom:0px"> <span style=3D"font-family:"Open Sans",sans-serif; font-size:9pt;= color:rgb(10,24,163)"><b>Excosoft =95 Daniel Norberg =95 Developer = =95 Application Consultant</b></span></p> <p class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; marg= in-top:0px; margin-bottom:0px"> <span style=3D"font-family:"Open Sans",sans-serif; font-size:9pt;= color:rgb(46,116,181)">S=F6derv=E4gen 70, SE-183 64 T=E4by, SWEDEN</span><= /p> <p class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; marg= in-top:0px; margin-bottom:0px"> <span style=3D"font-family:"Open Sans",sans-serif; font-size:9pt;= color:rgb(46,116,181)">Cell +46 (0)76-199 31 85</span></p> <p class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; marg= in-top:0px; margin-bottom:0px"> <span style=3D"font-family:"Open Sans",sans-serif; font-size:9pt;= color:rgb(46,116,181)">Email<b> </b><a href=3D"mailto:daniel.norberg@= excosoft.se" target=3D"_blank" title=3D"mailto:[email protected]= =0A= Ctrl+Click or tap to follow the link" rel=3D"noopener noreferrer" style=3D"= color:rgb(46,116,181); margin:0px">[email protected]</a></span></p= > <p class=3D"x_elementToProof" style=3D"direction:ltr; text-align:left; marg= in-top:0px; margin-bottom:0px"> <span style=3D"font-family:"Open Sans",sans-serif,serif,EmojiFont= ; font-size:9pt; color:rgb(46,116,181)"><a href=3D"http://www.excosoft.se/"= target=3D"_blank" rel=3D"noopener noreferrer" style=3D"margin:0px">www.exc= osoft.se</a></span></p> </div> </div> </div> </div> </body> </html> --_000_DB7PR06MB551405F4AB2C96058F08B99EFB3C2DB7PR06MB5514eurp_--