Hi, Jeremias,
Jay, if you'd like to help systematic testing here that would
be fantastic. Please note that quite a few test cases already
exist in test/layoutengine/standard-testcases (everything that
starts with external-graphic and instream-foreign-object).
Please note that the size
Hi, Jeremias,
I have run 0.90alpha1 on a couple of my larger documents, and I have
bumped into only two issues (one of which causes real trouble for me):
1. Images are not scaling to fit the space in which they are placed. I can
live with that, because I can go scale the images by hand before
I did read the upgrading page. It doesn't mention scaling.
1. A content-width=scale-to-fit will do what you want.
Well, no, it won't, actually. The trouble is that I don't want images that
are less than the width of the page to be expanded to the width of the
page. The old behavior of scaling
Well, now I'm investigating how to get the content-width of the image and
see if that exceeds the content-width of the content rectangle that will
hold the image.
Support for the scale-down-to-fit value for the content-width property
would work nicely. If I were to request an enhancement, that
I wrote an extension function in Java for Saxon that gives me the width
(and height, but that's less relevant) of an image. Then, if the width is
greater than 5.5 inches (the space I have available for screen shots in
this document format), the XSLT adds the content-width=scale-to-fit
so I'll let you know more detail soon (later today).
I had to add width=100% to my fo:table instructions to avoid a warning
message.
I'm more than a bit of a purist (and a perfectionist, too), so I don't
think I'm done coding until I get 0 warnings. So, 0.90alpha1 worked on
most of my files
An additional update to my testing:
After reading the spec, I thought of trying to make the image a fixed
width, so I tried
fo:external-graphic src=someimage.gif content-width=5.5in/
That makes images less than 5.5 inches wide be 5.5 inches wide, but the
PDF file created by FOP still blows up
Hi, Leon,
If you've got elements (paragraphs, headings, or other document pieces)
that must remain together, you can put them in a table and specify
keep-together=always on each row. Of course, if the elements are larger
than a page, FOP has to put a page break in there anyway.
Note: The
Hi, Hari,
One approach to this problem is to put that line of text and the signature
block into two rows in a table and then specify keep-together=always on
both rows.
You could also set break-before=page on that line, so as to always have
that line and the signature block on its own page (a
In this respect, it may prove worthwhile to track down whether
this difference is really caused by the XSLT processor itself,
or merely by the fact that Saxon comes bundled with its own
XML parser (AElfred).
From the Aelfred web site on Sourceforge:
Saxon versions from 7.2 onwards no longer
I have tried to implement Saxon8.6 in place of Xalan but am getting
errors. Are there other libraries I require?
Regards,
Daniel
Hi, Daniel,
The Saxon distribution is self-contained, so you should need no other
libraries. It requires Java 1.5 (or Java 1.4 and some additional package
from
Your best bet is to use XSLT to go from your source XML to XSL:FO and skip
trying to convert HTML into XSL:FO.
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
Leon Pu [EMAIL PROTECTED]
11/01/2005 11:08 AM
Please respond to
This sounds much like a problem I had some time back, wherein I needed to
make a small-caps font without using an actual small-caps font. Recalling
that a typographer friend once told me that the small caps is really an
all caps font with the lower-case letters set to 5/8 the size of the
The fix for this is to not use id. You should use an attribute named
id only when you plan to assign a unique identifier to that attribute.
Otherwise, lots of XML- and XSL-based systems (including but certainly not
limited to FOP) will break. So, use some other name instead: myid,
groupid,
(Jay's suggestion just rolled in --I'm not 100% sure, but I think FOP
will complain if it encounters attributes in the fo: namespace that are
not properties as defined in the Rec. FOP 0.20.5 may turn out to be
forgiving... Just to be on the safe side, I'd use a separate
namespace.)
There's no way to detect it, but there is a way to prevent it from
happening: Wrap those middle three blocks in a table, with each block
going into its own row (and cell). Then specify keep-together on all the
rows. Depending on your XSLT code, this can take some extra effort.
Sometimes,
Ok, i want to make a head, a body and a foot part of my site! So i have
to
implement a xsl-region-before, xsl-region-body and xsl-region-after part
on
my site! You understand?!?
But i can only implement a fo:flow flow-name=xsl-region-before or a
fo:flow flow-name=xsl-region-body but not
J.Pietschmann wrote:
Also, most of the PDF parts are already compressed (and re-encoded
as ASCII85). A secondary compression will probably gain something
between 15% and 20% for typical PDF files. Significant improvements
are only to be expected in case of large embedded BMP images and in
some
One possibility is that your printer is substituting fonts. If your
printer's fonts are very different from those specified in the PDF, the
change can be very noticeable (and often very unattractive). If your
printer has a setting to not substitute, try that. If the printer has such
a setting,
You can set the alignment properties on the blocks within the table cells,
thus:
fo:table table-layout=fixed
fo:table-column column-width=2in/
fo:table-column column-width=2.5in/
fo:table-column column-width=2in/
fo:table-body
fo:table-row
fo:table-cell
fo:block
The Compliance page (at
http://xml.apache.org/fop/compliance.html#fo-property-space-before) says
space-before.optimum is supported, so you could try changing space-before
to space-before.optimum.
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution
You can do XSLT processing separately, with xsltproc. It's a
pretty quick process, compared to the FOP step. The xsltproc
step will produce the single FO file you want, which FOP will
accept.
I haven't been following this conversation in full, but the above
paragraph caught my eye.
You
Hi, Luke,
If I gather correctly, the fellow with the problem is looking for a way to
customize the output of the [INFO] tags or (more precisely, I think)
generate his own [INFO] tags. He's processing a large number of tables,
which is going very slowly (tables being FOP's slow spot, after all)
Hi, Luis,
I have not bumped into the situation of a null value causing this error,
so I can't offer any direct advice about that.
However, I can think of a fix for it that you can do in your XSLT -
something on the order of:
xsl:apply-templates match=xref
xsl:choose
xsl:when
Well, FO doesn't have any sense of breaking at an arbitrary number of
characters. The FO idiom is to fill the line until the end of the line or
the end of the text is reached.
If you really want to break the text every eighty lines, you can do it
with XSLT and then put each chunk in its own
Hi, Mike,
I decided to give a non-mode method a go. I also decided to use XSLT 1.0.
Here's the result:
Given this toy XML source file:
book
front id=1
!-- Title, copyright, etc. --
chapter title=Known and Suspected Contributors id=11
!-- Content here somewhere! --
/chapter
Take a look at the author of that message - proof that what goes around
comes around.
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
Mike J Boyersmith [EMAIL PROTECTED]
04/19/2005 11:43 AM
Please respond to
I went through the same ordeal, and when I finally got
the encryption to work I discovered that my pdf
bookmarks became unreadable. So, if you have bookmarks
in your pdf that you want to keep, you may want to skip
trying to get the encryption installed.
Me, too. It'd be very nice if
The only trouble is that tables of contents aren't generally rendered as
tables. Each is generally rendered as a series of paragraphs.
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
Luke Shannon [EMAIL PROTECTED]
04/18/2005 01:27 PM
I can think of three ways, each one successively more painful than the
previous:
1. Draw it in a drawing applications and pick it up with
fo:external-graphic.
2. Create an SVG.
3. Create a table.
More about doing this as a table. Provided your data is pretty simple, you
can create a bar
No worries. I'm enough of a control freak to not rely on automatic layout
of anything, even in systems that let me do it.
Besides, I'm making plenty fine documents with FOP as it is, so anything
more is just a bonus anyway.
Jay Bryant
Bryant Communication Services
(presently consulting at
Hi, Dave,
I can't point you to a guide, but I can share my experiences. Being a
technical writer, I've had occasion to embed lots of screen shots in lots
of documents and then render PDF versions of those documents with FOP. In
the process, I've learned a couple things.
Naturally, you need to
Bear in mind that, when you put HTML tags into XML source files, those
tags aren't HTML tags. They are XML elements, same as everything else in
the document. By coincidence, they happen to have the same names as some
HTML tags. In other words, HTML tags are just like other elements until an
I hadn't really looked at this because the huge indentations put me off,
but now I've gotten around to it.
You can do this without disabling escape characters and by using literal
result elements. I'm inserting the whole stylesheet because the named
template needs to be called with certain
34 matches
Mail list logo