Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Hello Example of XSL-FO - Hello.fo
How to write a Hello example of XSL-FO?
✍: FYIcenter.com
XSL-FO (Extensible Stylesheet Language - Formatting Objects) is an XML based language that can be used to describes the way pages are set up. Here is the XML source code of a simple XSL-FO file, Hello.fo:
<?xml version="1.0" encoding="utf-8"?> <!-- hello.fo Copyright (c) 2018 FYIcenter.com --> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="myPage"> <fo:region-body margin="1in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="myPage"> <fo:flow flow-name="xsl-region-body"> <fo:block>Hello world!</fo:block> </fo:flow> </fo:page-sequence> </fo:root>
You can use the "fop" command to generate a PDF version of Hello.fo:
\fyicenter>cd \local\fop-2.x\fop \local\fop-2.x\fop>fop Hello.fo Hello.pdf ... org.apache.fop.events.LoggingEventListener processEvent INFO: Rendered page #1.
The output PDF file Hello.pdf has a single page with "Hello world!" printed at the top left corner with 1 inch margin.
2015-11-26, 2097🔥, 0💬
Popular Posts:
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module. JDK 17 Desktop module compiled ...
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...
What Is poi-contrib-3.5.jar? poi-contrib-3.5.jar is one of the JAR files for Apache POI 3.5, which p...
JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool, which can be invoked by the "jshell"...