Categories:
Audio (13)
Biotech (29)
Bytecode (35)
Database (77)
Framework (7)
Game (7)
General (512)
Graphics (53)
I/O (32)
IDE (2)
JAR Tools (86)
JavaBeans (16)
JDBC (89)
JDK (337)
JSP (20)
Logging (103)
Mail (54)
Messaging (8)
Network (71)
PDF (94)
Report (7)
Scripting (83)
Security (32)
Server (119)
Servlet (17)
SOAP (24)
Testing (50)
Web (19)
XML (301)
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.0\fop \local\fop-2.0\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, 1762👍, 0💬
Popular Posts:
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...
JDK 11 java.security.jgss.jmod is the JMOD file for JDK 11 Security JGSS (Java Generic Security Serv...
The JSR 105 XML Digital Signature 1.0.1 FCS implementation provides an API and implementation that a...
Commons VFS provides a single API for accessing various different file systems. It presents a unifor...