rendering TIFF with FOP 2.0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

rendering TIFF with FOP 2.0

Johannes.Katelaan@t-online.de
Hello,

I have to move my application from FOP 1.1 to FOP 2.0 for generating PDF/A that validates OK.

I have successfully migrated PDF and PDF/A rendering to FOP 2.0. No major problem with that.

But now after migrating to FOP 2.0 the TIFF rendering that happens in the same application is broken. Unfortunately I can't figure out how to change the code to make it work again.

This ist the first thing that doesn't work anymore:

    protected class MyTiffDocumentHandlerMaker extends TIFFDocumentHandlerMaker {
    ...
            @Override
        public IFDocumentHandler makeIFDocumentHandler(FOUserAgent ua) {

            TIFFDocumentHandler handler = new MyTiffDocumentHandler(color);
            handler.setContext(new IFContext(ua));
            return handler;

        }

Problems:

1.   makeIFDocumentHandler(FOUserAgent ua) does not exist anymore in TIFFDocumentHandlerMaker
2.   TIFFDocumentHandler has no setContext method anymore.

Here's ist the second thing that doesn't work anymore:

   protected class MyTiffDocumentHandler extends TIFFDocumentHandler {
   ...
            BitmapRenderingSettings settings = getSettings();
            settings.getWriterParams().setCompressionMethod(
                    TIFFConstants.COMPRESSION_PACKBITS);

Problem:

TIFFConstants does not exist anymore.

Can't I find sample code or documentation somewhere that explains how to do this with FOP 2.0.

I need to render TIFF. And I need to set resolution, compression and color mode.

Thanks

Johannes



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

AW: rendering TIFF with FOP 2.0

Johannes.Katelaan@t-online.de
OK, with the help of the FOP source I figured it out myself.

But to make it work I hat to patch the class org.apache.fop.render.bitmap.TIFFDocumentHandler.

I had to change visibility of the constructor to protected, because I derive from that class and need to call the constructor.

Can any of the developers please respond to this?

Or is this list not being read by the FOP developers?

Best regards

Johannes

-----Original-Nachricht-----
Betreff: rendering TIFF with FOP 2.0
Datum: Wed, 16 Sep 2015 12:14:20 +0200
Von: "[hidden email]" <[hidden email]>
An: [hidden email]

Hello,

I have to move my application from FOP 1.1 to FOP 2.0 for generating PDF/A that validates OK.

I have successfully migrated PDF and PDF/A rendering to FOP 2.0. No major problem with that.

But now after migrating to FOP 2.0 the TIFF rendering that happens in the same application is broken. Unfortunately I can't figure out how to change the code to make it work again.

This ist the first thing that doesn't work anymore:

    protected class MyTiffDocumentHandlerMaker extends TIFFDocumentHandlerMaker {
    ...
            @Override
        public IFDocumentHandler makeIFDocumentHandler(FOUserAgent ua) {

            TIFFDocumentHandler handler = new MyTiffDocumentHandler(color);
            handler.setContext(new IFContext(ua));
            return handler;

        }

Problems:

1.   makeIFDocumentHandler(FOUserAgent ua) does not exist anymore in TIFFDocumentHandlerMaker
2.   TIFFDocumentHandler has no setContext method anymore.

Here's ist the second thing that doesn't work anymore:

   protected class MyTiffDocumentHandler extends TIFFDocumentHandler {
   ...
            BitmapRenderingSettings settings = getSettings();
            settings.getWriterParams().setCompressionMethod(
                    TIFFConstants.COMPRESSION_PACKBITS);

Problem:

TIFFConstants does not exist anymore.

Can't I find sample code or documentation somewhere that explains how to do this with FOP 2.0.

I need to render TIFF. And I need to set resolution, compression and color mode.

Thanks

Johannes



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: rendering TIFF with FOP 2.0

Pascal Sancho-2
Hi,

can you please file in a Jira entry, attaching your material (test
case,  patch, etc)

This will ensure that nothing will be lost or omitted.

2015-09-16 16:37 GMT+02:00 [hidden email]
<[hidden email]>:

> OK, with the help of the FOP source I figured it out myself.
>
> But to make it work I hat to patch the class org.apache.fop.render.bitmap.TIFFDocumentHandler.
>
> I had to change visibility of the constructor to protected, because I derive from that class and need to call the constructor.
>
> Can any of the developers please respond to this?
>
> Or is this list not being read by the FOP developers?
>
> Best regards
>
> Johannes
>
> -----Original-Nachricht-----
> Betreff: rendering TIFF with FOP 2.0
> Datum: Wed, 16 Sep 2015 12:14:20 +0200
> Von: "[hidden email]" <[hidden email]>
> An: [hidden email]
>
> Hello,
>
> I have to move my application from FOP 1.1 to FOP 2.0 for generating PDF/A that validates OK.
>
> I have successfully migrated PDF and PDF/A rendering to FOP 2.0. No major problem with that.
>
> But now after migrating to FOP 2.0 the TIFF rendering that happens in the same application is broken. Unfortunately I can't figure out how to change the code to make it work again.
>
> This ist the first thing that doesn't work anymore:
>
>     protected class MyTiffDocumentHandlerMaker extends TIFFDocumentHandlerMaker {
>     ...
>             @Override
>         public IFDocumentHandler makeIFDocumentHandler(FOUserAgent ua) {
>
>             TIFFDocumentHandler handler = new MyTiffDocumentHandler(color);
>             handler.setContext(new IFContext(ua));
>             return handler;
>
>         }
>
> Problems:
>
> 1.   makeIFDocumentHandler(FOUserAgent ua) does not exist anymore in TIFFDocumentHandlerMaker
> 2.   TIFFDocumentHandler has no setContext method anymore.
>
> Here's ist the second thing that doesn't work anymore:
>
>    protected class MyTiffDocumentHandler extends TIFFDocumentHandler {
>    ...
>             BitmapRenderingSettings settings = getSettings();
>             settings.getWriterParams().setCompressionMethod(
>                     TIFFConstants.COMPRESSION_PACKBITS);
>
> Problem:
>
> TIFFConstants does not exist anymore.
>
> Can't I find sample code or documentation somewhere that explains how to do this with FOP 2.0.
>
> I need to render TIFF. And I need to set resolution, compression and color mode.
>
> Thanks
>
> Johannes
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

AW: rendering TIFF with FOP 2.0

Johannes.Katelaan@t-online.de
I did:

https://issues.apache.org/jira/browse/FOP-2526

-----Original-Nachricht-----
Betreff: Re: rendering TIFF with FOP 2.0
Datum: Thu, 17 Sep 2015 09:01:07 +0200
Von: Pascal Sancho <[hidden email]>
An: [hidden email],  "[hidden email]" <[hidden email]>

Hi,

can you please file in a Jira entry, attaching your material (test
case,  patch, etc)

This will ensure that nothing will be lost or omitted.

2015-09-16 16:37 GMT+02:00 [hidden email]
<[hidden email]>:

> OK, with the help of the FOP source I figured it out myself.
>
> But to make it work I hat to patch the class org.apache.fop.render.bitmap.TIFFDocumentHandler.
>
> I had to change visibility of the constructor to protected, because I derive from that class and need to call the constructor.
>
> Can any of the developers please respond to this?
>
> Or is this list not being read by the FOP developers?
>
> Best regards
>
> Johannes
>
> -----Original-Nachricht-----
> Betreff: rendering TIFF with FOP 2.0
> Datum: Wed, 16 Sep 2015 12:14:20 +0200
> Von: "[hidden email]" <[hidden email]>
> An: [hidden email]
>
> Hello,
>
> I have to move my application from FOP 1.1 to FOP 2.0 for generating PDF/A that validates OK.
>
> I have successfully migrated PDF and PDF/A rendering to FOP 2.0. No major problem with that.
>
> But now after migrating to FOP 2.0 the TIFF rendering that happens in the same application is broken. Unfortunately I can't figure out how to change the code to make it work again.
>
> This ist the first thing that doesn't work anymore:
>
>     protected class MyTiffDocumentHandlerMaker extends TIFFDocumentHandlerMaker {
>     ...
>             @Override
>         public IFDocumentHandler makeIFDocumentHandler(FOUserAgent ua) {
>
>             TIFFDocumentHandler handler = new MyTiffDocumentHandler(color);
>             handler.setContext(new IFContext(ua));
>             return handler;
>
>         }
>
> Problems:
>
> 1.   makeIFDocumentHandler(FOUserAgent ua) does not exist anymore in TIFFDocumentHandlerMaker
> 2.   TIFFDocumentHandler has no setContext method anymore.
>
> Here's ist the second thing that doesn't work anymore:
>
>    protected class MyTiffDocumentHandler extends TIFFDocumentHandler {
>    ...
>             BitmapRenderingSettings settings = getSettings();
>             settings.getWriterParams().setCompressionMethod(
>                     TIFFConstants.COMPRESSION_PACKBITS);
>
> Problem:
>
> TIFFConstants does not exist anymore.
>
> Can't I find sample code or documentation somewhere that explains how to do this with FOP 2.0.
>
> I need to render TIFF. And I need to set resolution, compression and color mode.
>
> Thanks
>
> Johannes
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]