You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Carson McDonald <mc...@yahoo.com> on 2000/09/07 14:05:44 UTC

Image questions

Sorry if this has already been gone over but the list archive doesn't seem to be
working. 

I'm trying to embed some graphics in a pdf and I have two problems:

1. The images don't want to follow the alignment I give them. I'm doing this:

    <fo:block text-align="start">
       <fo:external-graphic src="file:somefile.jpg"/>
    </fo:block>

    From my understanding that should start the graphic at the left side of the 
    page but instead it centers it.

2. Images in headers don't seem to act well. When I embed an image in an 
   "xsl-region-before" static content area the image will overflow into the text
   on the lines after. Even if I force the image to be a certain size the header
   only wants to be as large as the other text I put there.

While I'm at it. :) Is the source moving away from jdk1.1? I hade to change the
references to Lists and such to get it working with 1.1 (+collections.jar). I also
ended up having to comment out some of the gif processing code to get it to compile.
That didn't bother the above because I used 1.2 without any mods and got the same
problems.

Thanks

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Re: Image unable to be display

Posted by Stephan Albers <St...@jcatalog.com>.
Khim schrieb:
> 
> I am not sure whether anyone has ask this question before but did anyone
> try this two command?
>         Command 1:java org.apache.fop.apps.AWTCommandLine fo-file
>         Command 2:java -cp fop.jar;xerces.jar;w3c.jar
> org.apache.fop.apps.AWTCommandLine fo-file
> I tried to used these command to preview the result of the fo file, i does
> have a preview display but the image embedded are not shown. IS it the
> preview does not support image or could it be i missed out setting any
> classpath?

The AWT previewer should work with images. We have tested Gif and Jpeg.
I don't know about Bmp. SVG is only partially supported (80% of what is
in PDF), but we will improve this.

Stephan

Image unable to be display

Posted by Khim <la...@patroids.com>.
Hi there,
	I am not sure whether anyone has ask this question before but did anyone
try this two command?
	Command 1:java org.apache.fop.apps.AWTCommandLine fo-file
	Command 2:java -cp fop.jar;xerces.jar;w3c.jar
org.apache.fop.apps.AWTCommandLine fo-file
	I tried to used these command to preview the result of the fo file, i does
have a preview display but the image embedded are not shown. IS it the
preview does not support image or could it be i missed out setting any
classpath?
Thanx.
Khim


Separate Pages == null

Posted by "Christopher A. Brooks (NetRPG Webmaster)" <we...@netrpg.com>.
Hi all,

    I'm having a heck of a time trying to display two separate pages of
differing type and content.  I'm a newbie to fop and XSL-FO, so if anyone
has any suggestions, I would be more than happy to hear them.  I posted a
question similar to this on the mullberry XSL list.  I have the following
sheet, it's purpose is to define two page layouts (a cover sheet, and main
document), and then insert some data (just a header into the cover sheet,
and a header/footer/XSLT derived data in the rest of the following pages).

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>

<!-- layout for the first page -->
<fo:simple-page-master master-name="first" page-height="29.7cm"
page-width="21cm" margin-top="10cm" margin-bottom="10cm" margin-left="10cm"
margin-right="10cm">
    <fo:region-before extent="18cm"/>
    <fo:region-body margin-top="18cm"/>
    <fo:region-after extent="6.5cm"/>
</fo:simple-page-master>

<!-- layout for the other pages -->
<fo:simple-page-master master-name="rest" height="29.7cm" width="21cm"
margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm"
margin-right="2.5cm">
    <fo:region-before extent="2.5cm"/>
    <fo:region-body margin-top="2.5cm" margin-bottom="5.0cm"/>
    <fo:region-after extent="1.5cm"/>
</fo:simple-page-master>

<!-- How should the sequence of pages appear? -->
<fo:page-sequence-master master-name="PageLayout">
    <fo:repeatable-page-master-reference master-name="rest"/>
</fo:page-sequence-master>
</fo:layout-master-set>

<!-- actual layout -->
<!-- Title Page -->
<fo:page-sequence master-name="first">
    <!-- header -->
    <fo:static-content flow-name="xsl-region-before">
        <!-- Inserts a leader (rule). Because leader is an inline fo you
have to wrap it into a block element -->
        <fo:block text-align="end" font-size="10pt" font-family="serif"
line-height="14pt">
            Version <xsl:value-of select=".//verson"/>, <xsl:value-of
select=".//doctitle"/>
        </fo:block>
    </fo:static-content>
</fo:page-sequence>

<!-- Make a separate sequence for the non cover sheet -->
    <fo:page-sequence master-name="PageLayout">
        <!-- header -->
        <fo:static-content flow-name="xsl-region-before">
            <!-- Inserts a leader (rule). Because leader is an inline fo you
have to wrap it into a block element -->
            <fo:block text-align="end" font-size="10pt" font-family="serif"
line-height="14pt">
                Version <xsl:value-of select=".//verson"/>, <xsl:value-of
select=".//doctitle"/>
                <fo:leader leader-pattern="rule" space-before.optimum="2pt"
space-after.optimum="6pt" start-indent="0cm" end-indent="0cm"/>
            </fo:block>
        </fo:static-content>

        <!-- footer -->
        <fo:static-content flow-name="xsl-region-after">
            <fo:block text-align="end" font-size="10pt" font-family="serif"
line-height="14pt">
            Page <fo:page-number/>
            </fo:block>
        </fo:static-content>

        <!-- Main Body-->
        <fo:flow flow-name="xsl-region-body">
            <xsl:apply-templates />
        </fo:flow>

    </fo:page-sequence>
</fo:root>

I'm not quite sure what the problem is with my sheet, (I process it first
with Xalan and then with FOP (version 0.14.0) ) -- however when I remove all
references to the first page, everything works just fine.  Here are the
errors I'm receiving from FOP:

using SAX parser org.apache.xerces.parsers.SAXParser
using renderer org.apache.fop.render.pdf.PDFRenderer
using element mapping org.apache.fop.fo.StandardElementMapping
using element mapping org.apache.fop.svg.SVGElementMapping
using property list mapping org.apache.fop.fo.StandardPropertyListMapping
using property list mapping org.apache.fop.svg.SVGPropertyListMapping
building formatting object tree
setting up fonts
formatting FOs into areas
 [1>>>FATAL ERROR: null

Any help would be appreciated. (on a somewhat unrelated note, I have been
told that there are apache newsgroups that might also be of help, usually
more specifically for the xerces and xalan tools - is there an apache news
server kicking around?)

Chris
--
Christopher A. Brooks, NetRPG

Email: webmaster@netrpg.com
Web: http://www.netrpg.com/webmaster/