xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wessel van Norel <wessel.van.no...@ddnh.nl>
Subject Page-height scales image?
Date Fri, 04 Jul 2003 18:14:37 GMT
Hi,

I'm using FOP atm to create PDF previews for a client of my company. The 
PDF previews are based on a template with for example a header and a 
footer and a certain markup for the text.

Now I encounter a problem that I'm not able to explain. I have a header 
image which has a fixed height and width (defined in the XSL file). But 
this image is not displayed correctly if my page height is below a 
certain value. The page height is given in the XML input, since the 
template does not know how large it is going to be.
With excactly the same input, besides page-height, the image differs in 
size (it's being scaled).

I've put a border around the block where the image is put in. This 
border also increases in height when the image height increases.

With FOP 0.20.4 (which we are using in production) the area tree output 
shows no difference. But the image size and with that the size of the 
border differs with page-heights from 90mm to 119mm. 90mm is 
approximately the minimum, otherwise the content does not fit and FOP 
will generate an unlimited number of pages.
When the page-height is higher then this the image does not get bigger.

The same happens with FOP 0.20.5rc3a.

I've used both JPEG and PNG. No difference with them. So this can rule 
out JIMI problems if I'm correct.

The weirdest part is that the text below the header image is shown on 
excactly the same place, even though the image is scaled. I place the 
header in the region-before and the text below in the region-body.

I've also tried PS output. But it's the same. The image is scaled, but 
when you lay the two pages on top of each other and the start positions 
of the images on the same place, the text below the image is at excactly 
the same place.

I've not attached the PDF previews and XML + XSL files, since this is a 
mailing list. But if you think you can help me out I'm more then willing 
to send you the examples + input.

I hope I've given a clear enough explanation of my problem. If you have 
any questions about this, please contact me.

Regards
Wessel van Norel

P.S. can it be that the FOP 0.20.4 Area Tree generation does not work 
when I run it like this from my JAVA class:

       Driver driver = new Driver();
       driver.setLogger(log);
       driver.setRenderer(Driver.RENDER_XML);
       driver.setOutputStream(pdfFile);
       driver.render(handler.getParser(), handler.getInputSource());

I get a "java.lang.NullPointerException" when I do it, but when I change 
it from Driver.RENDER_XML to Driver.RENDER_PDF it works...

When I save the generated XML and use FOP from the command line it 
generates an area tree for me. No nullpointer exception.


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


Mime
View raw message