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 Igor Nepomnyashchiy <in...@hotmail.com> on 2001/05/21 14:44:48 UTC

Images in FOP

Hi,
       I've been trying to add JPEG images to FOP but cannot get the
compression to work. I have a 50K image resulting in a 200K PDF. By
comparision, iText, another package that creates PDFs, makes a 55K PDF.

    I have tried setting content-type and content-width and content-height
but those have had no effect on the PDF size. Is there something I am
missing, or have these features not been implemented yet?

Thanks
-Igor Nepomnyashchiy

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


Re: Images in FOP

Posted by Alex McLintock <al...@yahoo.com>.
I (Alex) wrote:
> > If you look at the PDF specs I don't believe you will see any facility to
> > store a JPG within a PDF file. Of course I may be wrong.

--- Jeremias Maerki <je...@outline.ch> wrote: 
> I'm afraid you're wrong, though it's not that obvious. The PDF specs
> (1.3) describe a DCTDecode filter which is used for JPEG images.

Oh - I didn't notice that last time I looked. Thanks for the correction
But I still have to assume FOP doesn't implement it, no?


I have put this entry into the FAQ (and yes - I had heard of iText - it is
in the FOP FAQ. More competitors to FOP are welcome to submit information
about their products)


How do I embed a jpg file within a PDF file
 At the moment FOP takes all bitmap image file formats it understands and turns this into a bitmap
 which it then compresses using a zip style algorythm. It doesn't actually store the jpg unchanged
in the PDF. Apparently the PDF spec does allow for this but it isn't implemented in FOP as of 21st
May  2001, FOP 0.18-DEV 

-->>
http://www.OWAL.co.uk:8090/asf/servlet/asf/screen/DisplayQuestionAnswer/action/SetAll/project_id/18/faq_id/276/topic_id/496/question_id/958
<<--

Remember folks, email me any submissions to the FAQ.


Thanks

Alex


=====
Alex McLintock        alex@OWAL.co.uk
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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


Re: Images in FOP

Posted by Jeremias Maerki <je...@outline.ch>.
> If you look at the PDF specs I don't believe you will see any facility to
> store a JPG within a PDF file. Of course I may be wrong.

I'm afraid you're wrong, though it's not that obvious. The PDF specs
(1.3) describe a DCTDecode filter which is used for JPEG images.

Jeremias Märki


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


Re: Images in FOP

Posted by Igor Nepomnyashchiy <in...@hotmail.com>.
Alex,
    I have not looked at the PDF spec, but... I have been working wiht an
alternate, iText (check out http://www.ip.pt/~ip001643/iText/). It has no
problem storing JPegs and creates PDFs only slightly bigger than my source
files (on the level of a few kilobytes). Also, what im working on is a
replacement for a system we already use that creates files of size similar
to iText, though it is a custom package.
    -Igor
----- Original Message -----
From: "Alex McLintock" <al...@yahoo.com>
To: <fo...@xml.apache.org>
Sent: Monday, May 21, 2001 10:13 AM
Subject: Re: Images in FOP


>
> --- Igor Nepomnyashchiy <in...@hotmail.com> wrote:
>
> >     Is there any way to get it to store the JPEG as a JPEG? The zipped
BMP
> > is still taking up lots of space and the end result of this will be a
> > servlet generated PDF that should be as small as possible.
>
> If you look at the PDF specs I don't believe you will see any facility to
> store a JPG within a PDF file. Of course I may be wrong.
>
>
> Alex
>
>
>
> =====
> Alex McLintock        alex@OWAL.co.uk
> OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
> DR WHO COMPETITION:
http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
> Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
>

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


Re: Conversion RTF to FO

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
> I 'd like to convert a .RTF file to .FO file.
> Is there a program doing  it ?

There are a few programs called "rtf2xml" on the web (see 
http://www.google.com/search?q=rtf2xml), but I didn't test any of them yet.

It might be your first step: convert RTF to XML, then use XSL to generate 
XSL:FO.

You could also use upCast (commercial product, http://www.infinity-loop.de/) 
for the RTF-to-XML conversion step, it does a job of making sense out of RTF.

-- 
 -- Bertrand Delacrétaz, www.codeconsult.ch
 -- web technologies consultant - OO, Java, XML, C++



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


Conversion RTF to FO

Posted by Hoang Nam <nn...@yahoo.fr>.
Hello all,

I 'd like to convert a .RTF file to .FO file.
Is there a program doing  it ?

Thanks alot for any help!

Nam





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Re: Images in FOP

Posted by Eric SCHAEFFER <e-...@wanadoo.fr>.
If I remember well, JPEG images can be stored directly in PDF documents.
FOP reads images, decompresses them, and store them compressed by ZLib. A
lot of changes needs to be done to store images in their "native" format...

Eric.

______________________________

Eric SCHAEFFER
eschaeffer@emahoo.com
FOP, the first XSL:FO Processor
http://xml.apache.org/fop

----- Original Message -----
From: "Alex McLintock" <al...@yahoo.com>
To: <fo...@xml.apache.org>
Sent: Monday, May 21, 2001 4:13 PM
Subject: Re: Images in FOP


>
> --- Igor Nepomnyashchiy <in...@hotmail.com> wrote:
>
> >     Is there any way to get it to store the JPEG as a JPEG? The zipped
BMP
> > is still taking up lots of space and the end result of this will be a
> > servlet generated PDF that should be as small as possible.
>
> If you look at the PDF specs I don't believe you will see any facility to
> store a JPG within a PDF file. Of course I may be wrong.
>
>
> Alex
>
>
>
> =====
> Alex McLintock        alex@OWAL.co.uk
> OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
> DR WHO COMPETITION:
http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
> Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
>



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


keeps and breaks

Posted by Duncan Hull <du...@csw.co.uk>.
Hello fops!

Can anyone tell me if keeps and breaks will be implemented in the final (non-dev) version of FOP 0.18? I've used 0.17 and understand that breaks and keeps are not supported in that version.

Duncan

***********************************************
Duncan Hull
CSW Informatics Ltd
4240 Nash Court, Oxford Business Park South, Oxford, OX4 2RU
Tel: +44/0 1865 337400  Fax: +44/0 1865 337433
Web: http://www.cswinformatics.com

"CSW Informatics delivers high quality consultancy and
training services, to assist our customers in meeting their
requirements for innovative information management
solutions using the most appropriate technologies,
products and software systems"

----------------------------------------------
CSW's XML SUMMER SCHOOL 20th - 25th July 2001
St. Anne's College, OXFORD
SIGN UP NOW: http://www.xmlsummerschool.com
----------------------------------------------

Legal Disclaimer: http://www.csw.co.uk/disclaimer.htm
***********************************************




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


Re: Images in FOP

Posted by Alex McLintock <al...@yahoo.com>.
--- Igor Nepomnyashchiy <in...@hotmail.com> wrote: 

>     Is there any way to get it to store the JPEG as a JPEG? The zipped BMP
> is still taking up lots of space and the end result of this will be a
> servlet generated PDF that should be as small as possible.

If you look at the PDF specs I don't believe you will see any facility to
store a JPG within a PDF file. Of course I may be wrong.


Alex



=====
Alex McLintock        alex@OWAL.co.uk
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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


Re: Images in FOP

Posted by Igor Nepomnyashchiy <in...@hotmail.com>.
Alex,
    I am using the 18.1 version that I built from the sources.I noticed what
you were talking about: the PDF was less in size than what a BMP created
from the same JPEG was.

    Is there any way to get it to store the JPEG as a JPEG? The zipped BMP
is still taking up lots of space and the end result of this will be a
servlet generated PDF that should be as small as possible.

-Igor
----- Original Message -----
From: "Alex McLintock" <al...@yahoo.com>
To: <fo...@xml.apache.org>
Sent: Monday, May 21, 2001 9:11 AM
Subject: Re: Images in FOP


>
> --- Igor Nepomnyashchiy <in...@hotmail.com> wrote: > Hi,
> >        I've been trying to add JPEG images to FOP but cannot get the
> > compression to work. I have a 50K image resulting in a 200K PDF. By
> > comparision, iText, another package that creates PDFs, makes a 55K PDF.
>
> This was typical of FOP last year. More recent versions have image
compression
> working fine - or at least working.
>
> Note that a jpg will not be stored in the file as a jpeg - but converted
> into a plain PDF bitmap - and then compressed using something like Zip
> algorithms.
>
> What version of FOP are you using?
>
>
> Alex
>
>
> =====
> Alex McLintock        alex@OWAL.co.uk
> OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
> DR WHO COMPETITION:
http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
> Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
>

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


Re: Images in FOP

Posted by Alex McLintock <al...@yahoo.com>.
--- Igor Nepomnyashchiy <in...@hotmail.com> wrote: > Hi,
>        I've been trying to add JPEG images to FOP but cannot get the
> compression to work. I have a 50K image resulting in a 200K PDF. By
> comparision, iText, another package that creates PDFs, makes a 55K PDF.

This was typical of FOP last year. More recent versions have image compression
working fine - or at least working.

Note that a jpg will not be stored in the file as a jpeg - but converted
into a plain PDF bitmap - and then compressed using something like Zip
algorithms.

What version of FOP are you using?

 
Alex


=====
Alex McLintock        alex@OWAL.co.uk
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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