Implementing XSL-Formatting Objects Washington DC

Everyone loves a well-designed Web page, but have you ever tried to print one and discovered a big mess and maybe some unhappy users? See how using FOP (Formatting Objects Processor) can help.

Local Companies

Evergreen Computer Services, Inc
(301) 758-2986
12421 Alamanco Way
Washington, DC
Grytek
800-516-0840
11505 Cherry Tree Crossing RD
Cheltenham, MD
NGEN, LLC
(301) 531-9700
1101 Mercantile Lane
Washington, DC
Sophisticated Technologies, Inc.
(301) 731-1015
3311 Grayvine Lane
Washington, DC
L-Soft International, Inc.
(301) 731-0440
8100 Corporate Dr. Suite 350
Washington, DC
Total Service Solutions
(301) 306-7206
4601 Forbes Blvd.
Washington, DC
The Carrington Group, Inc
(202) 726-4441
1818 New York Ave., NE Suite 115
Washington, DC
CGH Technologies, Inc.
(202) 580-7400
600 Maryland Ave., SW
Washington, DC
Enlightened, Inc.
(202) 783-4655
666 11th St., NW
Washington, DC
recover data
001-9800000000
Co-Lane
City, NY

provided by: 
Originally published at Internet.com


Everyone loves a well-designed Web page, but I hope you never tried to print one and found out that it resulted in a big mess and maybe some unhappy users. There are many technologies that you can use to solve this problem, but the majority of them require spending some money and time.

Today we are going to talk about the FOP (http://xml.apache.org/fop) Formatting Objects Processor. You can download the code from the Web site free of charge, but it requires some time to learn how to use it and how to create good solutions. Essentially, FOP is based on the W3C recommendation http://www.w3.org/TR/2001/REC-xsl-20011015/.

The best way to learn how to use FOP is to create a sample. For example, let's imagine that we need to generate a PDF file with the price list of the ACME Corporation. It should look like the following:

First of all, we need to start our document as follows:

This helps us to define the correct namespace (http://www.w3.org/TR/REC-xml-names/) that we need to use.

After that, we will need to define the size of the output page that we want to use.

With this information available, we just create a standard, letter-sized page. After this, we need to create a section with the actual layout of the document that we need to generate.

This statement will match with the layout defined above and it will set the page number to 1. To print out any message, we need to define . Implementing FOP

This block will generate a 24pt line with blue background and white letters, centered, and with the title Implementing FOP.

Now, let's include a table with the products' numbers, descriptions, and prices. This is the header of the table: Product Number Description Price

One important issue is that we need to include a prefixed size of the column. Right now, FOP does not allow you to define automatic layouts.

We use the same approach as HTML by using . Here is how it looks after we include the table. ***************************sample.fo ********************************* ACME Corporation Product Number Description Price 12345 Rocket $250.00 67890 TNT

Author: Gerardo Garcia

Read article at Internet.com site

Featured Local Company

Evergreen Computer Services, Inc

(301) 758-2986
12421 Alamanco Way
Washington, DC

Related Local Events
DC Chamber Technology Series: Session 4
Dates: 12/10/2009 - 12/10/2009
Location: Robert H. Smith School at the Ronald Reagan Building and International Trade Center
Washington, DC
View Details

National Facilities Management & Technology (NFMT)
Dates: 3/16/2010 - 3/28/2010
Location: Baltimore Convention Center
Baltimore, MD
View Details

CSI 2009: The Next Phase In Security
Dates: 10/24/2009 - 10/30/2009
Location: Gaylord National Resort and Convention Center
National Harbor, MD
View Details

ACIs 3rd Annual Carbon Capture and Sequestration Summit
Dates: 9/14/2009 - 9/15/2009
Location: Omni Shoreham Hotel
Washington, DC
View Details

3rd Carbon Capture and Sequestration Summit
Dates: 9/14/2009 - 9/15/2009
Location: Omni Shoreham Hotel
Washington, DC
View Details