Zmitko, Jan | 1 Jul 2003 14:32

regions overlaps - only in certain cases

Hello,

I´ve read in the FAQ and the Archive of the List. But I´ve not found
accurate Solution for my Problem. My Problem is, that my region-before
overlaps with the region-body but only if the region before has a line more
(cause by linebreak). The margin and extend values I´ve set.

My XSL Stylesheet shows as follows. Havy anybody an idea how to solve it.

Thanks, Jan

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<fo:layout-master-set>
		<fo:simple-page-master master-name="simple"
page-height="29.7cm" page-width="21cm" margin-left="1.7cm"
margin-top="1.0cm" margin-bottom="1.3cm" margin-right="1.2cm">
		<fo:region-before extent="5.5cm" />
		<fo:region-body margin-top="5.5cm" margin-bottom="2.85cm"/>
		<fo:region-after extent="2.85cm"/>
		<fo:region-start/>
		<fo:region-end/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="simple">
		<fo:static-content flow-name="xsl-region-before"
display-align="before">
			<fo:block-container absolute-position="fixed"
position="absolute" height="2.0cm" left="-0.85cm">
				<xsl:call-template name="headerLogo"/>
			</fo:block-container>
(Continue reading)

Chris Bowditch | 1 Jul 2003 16:21
Picon
Favicon

JPEG images in Postscript

Hi All,

I'm having trouble with Postscript generated by FOP 0.20.5rc3a. I have a 
document containing some JPEG images. The postscript file is produced 
without error with -d option specified. However, both Adobe Distiller and 
Ghostview fail to open the Posctscript. This is the output from distiller:

%%[ Error: undefined; OffendingCommand: 
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz ]%%

I found some recent discussion on JPEG image in Postscript in the archives. 
This problem was caused by gray scale images, but Paint Shop Pro reports my 
JPEG images as being 24-bit/pixel color.

Any thoughts on this would be appreciated,

Thanks,

Chris

_________________________________________________________________
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile
George Yi | 1 Jul 2003 16:31

RE: JPEG images in Postscript


Could you send a sample fo and jpeg image?

-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris <at> hotmail.com]
Sent: Tuesday, July 01, 2003 9:22 AM
To: fop-user <at> xml.apache.org
Subject: JPEG images in Postscript

Hi All,

I'm having trouble with Postscript generated by FOP 0.20.5rc3a. I have a
document containing some JPEG images. The postscript file is produced
without error with -d option specified. However, both Adobe Distiller and
Ghostview fail to open the Posctscript. This is the output from distiller:

%%[ Error: undefined; OffendingCommand:
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz ]%%

I found some recent discussion on JPEG image in Postscript in the archives.
This problem was caused by gray scale images, but Paint Shop Pro reports my
JPEG images as being 24-bit/pixel color.

Any thoughts on this would be appreciated,

Thanks,

Chris

_________________________________________________________________
(Continue reading)

Alessio Padovani | 1 Jul 2003 16:44
Picon
Favicon

Problem render AWT

Good morning, i have a problem with AWT render  with FOP

i want to embed FOP in java application

if i try to render from FO->PDF it's work fine.

But if i try render from FO->AWT it'show this error:

Exception in thread "main" java.lang.IllegalArgumentException: Could not 
instant
iate org.apache.fop.render.awt.AWTRenderer
        at org.apache.fop.apps.Driver.setRenderer(Driver.java:419)
        at Fo2Pdf.main(Fo2Pdf.java:12)

i want use org.apache.fop.render.awt.AWTRenderer class but i unable to 
make this render
Can someone help me?
Alessio
Chris Bowditch | 1 Jul 2003 16:58
Picon
Favicon

RE: JPEG images in Postscript

Hi George,

thanks for your quick reply. I have attached the fo and two images to this 
e-mail. Looking at the generated postscript there is a bunch of ZZZZZ 
characters in the image data. I was wondering if this could be a 
transparency issue or something like that. Your thoughts would be greatly 
appreciated.

Chris

>From: George Yi <gyiii <at> srds.com>
>
>
>Could you send a sample fo and jpeg image?
>

_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you. 
http://www.msn.co.uk/internetaccess
Attachment (db.zip): application/x-zip-compressed, 18 KiB
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe <at> xml.apache.org
For additional commands, e-mail: fop-user-help <at> xml.apache.org
Jeremias Maerki | 1 Jul 2003 17:18
Picon
Favicon

Re: JPEG images in Postscript

Almost suspected it....I believe it's a bug in the ASCII-85 encoder
which I've fixed in the redesign but haven't been able to upload, yet.
I'll be able to fix the bug for the maintenance branch later this week.

In the meantime you can locally patch PSRenderer.java:

Change "/ASCII85Decode" to "/ASCIIHexDecode":

            if (img instanceof JpegImage) {
                write("  /DataSource currentfile /ASCIIHexDecode filter /DCTDecode filter");

and "new ASCII85OutputStream" to "new ASCIIHexOutputStream":

                OutputStream out = this.out;
                out = new ASCIIHexOutputStream(out);
                if (!(img instanceof JpegImage)) {

That makes the generated files a bit bigger, but at least they work.

On 01.07.2003 16:58:17 Chris Bowditch wrote:
> thanks for your quick reply. I have attached the fo and two images to this 
> e-mail. Looking at the generated postscript there is a bunch of ZZZZZ 
> characters in the image data. I was wondering if this could be a 
> transparency issue or something like that. Your thoughts would be greatly 
> appreciated.

Jeremias Maerki
Clay Leeds | 1 Jul 2003 17:22

Re: Problem render AWT

This is just a guess, but perhaps you're running FOP headless (there's 
no monitor?). This FAQ might provide a workaround:

http://xml.apache.org/fop/graphics.html#batik

On 7/1/2003 7:44 AM, Alessio Padovani wrote:
> Good morning, i have a problem with AWT render  with FOP
> 
> i want to embed FOP in java application
> 
> if i try to render from FO->PDF it's work fine.
> 
> But if i try render from FO->AWT it'show this error:
> 
> Exception in thread "main" java.lang.IllegalArgumentException: Could not 
> instant
> iate org.apache.fop.render.awt.AWTRenderer
>        at org.apache.fop.apps.Driver.setRenderer(Driver.java:419)
>        at Fo2Pdf.main(Fo2Pdf.java:12)
> 
> i want use org.apache.fop.render.awt.AWTRenderer class but i unable to 
> make this render
> Can someone help me?
> Alessio
--

-- 
Clay Leeds - cleeds <at> medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
Jeremias Maerki | 1 Jul 2003 17:24
Picon
Favicon

Re: regions overlaps - only in certain cases

Hi Jan

Something that I found is:

block-container's top + block-container's height = 1.75 + 5.5 = 7.25

page-master's margin-top + region-body's margin-top = 1.0 + 5.5 = 6.5

which means that the block-container overlaps the region-body by design.
Try reducing the block-container's height by 0.75cm. But you may get an
overflow warning, when there's a linebreak. You may need to find a way
to avoid the linebreak or provide more space so the linebreak doesn't
matter. If you don't have to print the whole header on every page you
can put part of it in the flow and therefore avoid the overlap. Lots of
things to try...

On 01.07.2003 14:32:32 Zmitko, Jan wrote:
> I´ve read in the FAQ and the Archive of the List. But I´ve not found
> accurate Solution for my Problem. My Problem is, that my region-before
> overlaps with the region-body but only if the region before has a line more
> (cause by linebreak). The margin and extend values I´ve set.
> 
> My XSL Stylesheet shows as follows. Havy anybody an idea how to solve it.

Jeremias Maerki
Clay Leeds | 1 Jul 2003 17:23

Re: JPEG images in Postscript

On 7/1/2003 8:18 AM, Jeremias Maerki wrote:
> Almost suspected it....I believe it's a bug in the ASCII-85 encoder
> which I've fixed in the redesign but haven't been able to upload, yet.
> I'll be able to fix the bug for the maintenance branch later this week.

Just out of curiosity, does this bug affect 0.20.4?
--

-- 
Clay Leeds - cleeds <at> medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
Chris Bowditch | 1 Jul 2003 17:29
Picon
Favicon

Re: JPEG images in Postscript

Thanks Jeremias!

>From: Jeremias Maerki <dev.jeremias <at> greenmail.ch>
>
>Almost suspected it....I believe it's a bug in the ASCII-85 encoder
>which I've fixed in the redesign but haven't been able to upload, yet.
>I'll be able to fix the bug for the maintenance branch later this week.
>
>In the meantime you can locally patch PSRenderer.java:
>
>Change "/ASCII85Decode" to "/ASCIIHexDecode":
>
>             if (img instanceof JpegImage) {
>                 write("  /DataSource currentfile /ASCIIHexDecode filter 
>/DCTDecode filter");
>
>and "new ASCII85OutputStream" to "new ASCIIHexOutputStream":
>
>                 OutputStream out = this.out;
>                 out = new ASCIIHexOutputStream(out);
>                 if (!(img instanceof JpegImage)) {
>
>That makes the generated files a bit bigger, but at least they work.
>

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger

Gmane