David,

We are doing this by fop'ing to pdf and using ghostscript to convert to tiff. It works very well, and you have lots of tiff encoding choices.

On Tuesday, March 4, 2003, at 12:45  PM, David Blevins wrote:

Thanks for the reply Oleg,

Multithreaded access isn't a requirement, so we are in the clear there.
The requirements are simple:

1. TIFFs must use comp group 3x or greater
2. Must be able to set (or even hardcode) the width and height.
3. Must be able to split each "page" of the XSL-FO doc into separate
TIFF files.

That's it.

I've tried:
1. XSL-FO to SVG to TIFF using FOP and Batik.  Meets requirements 2 and
3 nicely but not 1.  The generated TIFF files are more than two meg at
the required width and height.

2. XSL-FO to TIFF using your TIFFRenderer.  Meets requirement 1, though
still getting black backgrounds.  Using Photoshop and QuickTime to view
the output.  This might be an easy thing to reverse if I knew which
section of the code needed changing.  If that were resolved, I would
still need a solution for requirements 2 and 3.

3. XSL-FO to SVG to TIFF using FOP and Batik hacked to use your
TIFFImageEncoder.  Was really hoping this would get me the compression
capabilities (requirement 1) while retaining the ability to do
requirements 2 and 3.  Unfortunately, it didn't work.  It can generate
uncompressed TIFFs just fine, but trying any compression generates
invalid TIFF files about 2k in size.


At this point, I'm not sure what direction to go next. It seems like your code is the simplest. If we could work out a solution between the two of us, I would be more than happy to code it up and contribute the code.

Best regards,
David


Oleg Tkachenko <olegt () multiconn ! com> wrote:

Hello!

"David Blevins" <david.blevins () visi ! com> wrote:
Now I have my first question, so here goes. What is the
recommended
approach to generate a TIFF output: using the SVGRenderer then
transcoding to TIFF with batik; using the TIFFRenderer written by
Oleg?
Hard question. TIFFRenderer has some flaws: it is not
thread-safe, because
AWTRenderer isn't. Another its problem is that all generated
page images are
held in memory. Both issues I hope will be fixed in FOP
1.0dev. So may be
SVGRenderer is a prefered approach at the moment.

The TIFFRenderer works, however the outputted TIFF is white text on
black background (should be the other way around).  Maybe there is
something I need to configure correctly.
Well, which TIFF viewer are you using? AFAIK, there is a
great mess amongst
TIFF viewers what is white and what is black in b/w FAX
compressed images,
e.g. consider given black-and-white TIFF image, Adobe
Photoshop and Windows
Imaging will show it differently black on white or white on black.
TIFFRenderer uses JAI encoder, which seems to be agree with
Adobe in this
question, so I always rely on Photoshop and Alternatiff
plugin and never got
inverted image.
Actually I've been thinking about introducing such a
parameter to TIFFRenderer
to allow control over that. Ok, granted, will try this week.

There also doesn't seem to any new versions of the
TIFFRenderer. The
latest I can find is 0.9 from May last year.  Is this there an
updated, unreleased version somewhere?
Well, I just don't see how can I make it better, it's quite
simple wrapper,
which heavily rely on JAI encoder and AWTRenderer. Now, when
I'm FOP committer
I'd better be focused on how to make FOP itself better,
TIFFRenderer will
benefit from it also.

--
Oleg Tkachenko
Multiconn Technologies, Israel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to