You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by JV <jv...@orange.nl> on 2006/08/30 18:38:25 UTC

External-graphic problem

Hi there,

I'm trying to use an external image, but for some reason it doesn't  
appear. I'm using a servlet to create the pdf. Below is the FO-code.  
The servlet is located in another domain. I've copied the image to  
all locations to be sure, but that didn't help. I've tried several  
images, including a png. I've tried to call it using src="url 
(test.gif)" and src="test.gif", and using a domain name.

Any ideas what I'm doing wrong here?

JV.

###########################################

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"  
xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<fo:layout-master-set>
		<fo:simple-page-master margin-right="3cm" margin-left="1cm" page- 
width="21cm" page-height="29.7cm" master-name="default-page">
			<fo:region-body margin-left="5cm" margin-bottom="3cm" margin- 
top="3cm"/>
			<fo:region-start extent="4cm"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="default-page">
		<fo:static-content flow-name="xsl-region-start">
			<fo:block margin-top="3cm" text-align="end" font-size="8pt" font- 
family="Times">
				<fo:block background-color="#ddd" margin-bottom="5mm">
					<fo:external-graphic src="url(test.gif)"/>
				</fo:block>
				
			</fo:block>
		</fo:static-content>
		<fo:flow flow-name="xsl-region-body">
			<fo:block font-family="Times">
				<fo:block font-size="10pt">
					
					<fo:block font-weight="bold" font-size="18pt" font- 
family="Helvetica" space-before.optimum="5mm">
						Test include external image
					</fo:block>
					
				</fo:block>
				
				
			</fo:block>
		</fo:flow>
	</fo:page-sequence>
</fo:root>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: External-graphic problem

Posted by JV <jv...@orange.nl>.
Thanks for your replies. I've tried to run the fo locally, and that  
worked fine. The image was too big, but after applying a 4cm width to  
it, it fitted like it should (the image should appear left of the  
body in a region-start). Applying that width to the original fo  
didn't help. I've tried to find the logs, but don't know where to  
look. I'm using fop 0.92 on a Mac (OSX 10.4). I opened the Console  
(the log viewer for OSX), but couldn't find anything about fop.

JV


Op 31 aug 2006, om 08:51 heeft Jeremias Maerki het volgende geschreven:

>
> On 31.08.2006 01:12:04 Michael Hahn wrote:
>> JV wrote:
>>
>>> I'm trying to use an external image, but for some reason it doesn't
>>> appear. I'm using a servlet to create the pdf. Below is the FO- 
>>> code. The
>>> servlet is located in another domain. I've copied the image to all
>>> locations to be sure, but that didn't help. I've tried several  
>>> images,
>>> including a png. I've tried to call it using src="url(test.gif)" and
>>> src="test.gif", and using a domain name.
>>>
>>> Any ideas what I'm doing wrong here?
>>
>> Try moving the <fo:external-graphic> to the body of the page  
>> first--if
>> it appears, it's probably too large to fit in the header area  
>> (more than
>> 4cm high).
>
> Michael could be right. In that case you'd see a warning or error  
> on the
> log. It's very important to look at what FOP tells you. I'm certain  
> that
> FOP will tell you about the image problem in one way or another.
>
> Another thing that could help you is to run the conversion outside  
> your
> servlet from the command-line. That let's you exclude the servlet
> environment out of the equation which can help you circle in on the
> problem.
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: External-graphic problem

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 31.08.2006 01:12:04 Michael Hahn wrote:
> JV wrote:
> 
> > I'm trying to use an external image, but for some reason it doesn't 
> > appear. I'm using a servlet to create the pdf. Below is the FO-code. The 
> > servlet is located in another domain. I've copied the image to all 
> > locations to be sure, but that didn't help. I've tried several images, 
> > including a png. I've tried to call it using src="url(test.gif)" and 
> > src="test.gif", and using a domain name.
> > 
> > Any ideas what I'm doing wrong here?
> 
> Try moving the <fo:external-graphic> to the body of the page first--if 
> it appears, it's probably too large to fit in the header area (more than 
> 4cm high).

Michael could be right. In that case you'd see a warning or error on the
log. It's very important to look at what FOP tells you. I'm certain that
FOP will tell you about the image problem in one way or another.

Another thing that could help you is to run the conversion outside your
servlet from the command-line. That let's you exclude the servlet
environment out of the equation which can help you circle in on the
problem.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: External-graphic problem

Posted by Michael Hahn <am...@cox.net>.
JV wrote:

> I'm trying to use an external image, but for some reason it doesn't 
> appear. I'm using a servlet to create the pdf. Below is the FO-code. The 
> servlet is located in another domain. I've copied the image to all 
> locations to be sure, but that didn't help. I've tried several images, 
> including a png. I've tried to call it using src="url(test.gif)" and 
> src="test.gif", and using a domain name.
> 
> Any ideas what I'm doing wrong here?

Try moving the <fo:external-graphic> to the body of the page first--if 
it appears, it's probably too large to fit in the header area (more than 
4cm high).

-- 
a.m. slotnik

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org