Skip to Content
XSL-FO
book

XSL-FO

by Dave Pawson
August 2002
Intermediate to advanced
284 pages
8h 27m
English
O'Reilly Media, Inc.
Content preview from XSL-FO

Chapter 7. Graphics and Color

Graphics are mentioned briefly in Chapter 3 and Chapter 6 in the discussions of blocks and inlines. You will need to consult your formatter’s documentation to determine what graphics formats are viable. All the formatters I’ve used are happy with JPEG.

Color is one of the most generally applicable properties in the specification, which makes it somewhat harder to describe concisely. If you have a CSS background, you might already be familiar with its use on web pages. The coverage is just as broad as in CSS, and indeed many of the properties carry over directly from CSS. The specification of color is quite similar to that in CSS; colors can be specified by name or as Red-Green-Blue (RGB) color value numbers. However, XSL-FO includes additional, more sophisticated ways to specify colors.

While color can add value to presentation, it can also spoil it. It should support your message, not overwhelm it. Use it carefully and it will work well.

Graphics

The fo:external-graphic formatting object is always inline. If you want it to act like a block, you have to wrap it in a block.

The fo:instream-foreign-object is often used to include Scalable Vector Graphics (SVG) directly in the file, and it has all the same properties as an external-graphic.

fo:external-graphic provides the wrapper for graphics. Why external? Because the actual graphic’s file is external to the XML source document. If wrapped in a block or inline, the graphic is appropriately laid out by ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

XSL companion, The

XSL companion, The

Neil Bradley
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0596003552Errata Page