|
Hello
I'm pretty new to XSL-FO and FOP so please bare
with me (I've done my research though reading the spec, checking compliance
tables, faq:s, tutorials, examples, sample chapters...).
I am trying to build this document with our company
graphic profile in mind. According to the profile there is a header and a footer
(of course) needed and also a border, consisting of three vertical
stripes, on the right side of the document (from the utter top to the
complete bottom of the document). Apart from this there is also the
content.
The solution so far consists of a static-content
for the head and a static-content for the footer and then there is the body with
all the content. The header and the footer and the content is in place. All this
sounds well and nice so far. I have, however, run into several problems doing all of this and some problems isn't solved.
Problem 1 (Fat, multi-colored, vertical border to
the right):
I have made this 1px high and 8.5in wide image with
the colored border on the far right side and then put it as the background-image
in a block element that contains all other elements in the three regions I
described before (header (static-content), content (region-body) and the footer
(static-content)). The problem is that Acrobat Reader seems to alter the
rendered width of the borders when you change the zoom-level but it doesn't
change the width evenly among the three regions. The result is that the border
looks perfect sometimes and sometimes the border in the header is wider
than the border in the content and vice versa. Can I do something about this? Is
there another solution than putting the border image in the three areas? I have
thought of making use of region-end but then I cannot use region-before for my
header (which has to be at the absolute top of the document) and I cannot use
the footer area either. Another problem here is that the border in the content
area ends in the middle of the page on the last page. How do I do it to stretch
all the way down to the footer?
Problem 2 (Normal borders):
I want to do headers that has a different
background-color than the rest of the document and it should also be framed by a
thin border (1px wide if you would do it in html and css). The problem here is
that I use border with the same value of the border-width the rendered width
alters throughout the document. Why? Is there a magic value of the border-width
to make sure that the border-width always is the same, nice, thin line that I
want.
Problem 3 (Borders around images):
I want to draw borders around some images. Have
tried some ways but it doesn't just seems to be any borders in the rendered
result. The ways I've tried is:
- <fo:external-graphic src=""
border-width=".1mm" border-style="solid" border-color="#444444"/>
- <fo:inline border-width=".1mm"
border-style="solid" border-color="#444444"><fo:external-graphic
src=""/></fo:inline>
- <fo:block border-width=".1mm"
border-style="solid" border-color="#444444"><fo:external-graphic
src=""/></fo:block> (This way a border is rendered but it
doesn't get rendered tightly around the image)
So, how do I render a border around an
image?
Problem 4 (Black jpgs):
When I insert external-graphics that are gif and
png everything works nice but when I try to include a jpg it just renders a
black rectangle. Why? I have looked in the faqs and some other places but the
only related is the thing about having to include jimi for pngs. Isn't jpgs
supported?
"Problem 5" (Image resolution):
I'm just a poor programmer nowing little about
needed resolution. Using images produced for web (with 72 dpi) gives me a
horrible result when I use them with FOP. What is the minimum resolution to use
when producing pdfs to get a good-looking result? 300 or even more?
I am using FOP-0.20.4 under jdk1.4.1.
A solution to just one of the problems is much
better than a solution to none ;). I'll also try to extract some snippets
if you need some code to work with so just tell me.
Thanx in advance
best regards,
Marcus Andersson
|
- Re: Some questions Marcus Andersson
- Re: Some questions Clay Leeds
- Re: Some questions Marcus Andersson
- Re: Some questions J.Pietschmann
- RE: Some questions Victor Mote
