Paulo, I asked the developer of Leptonica/Jbig2 software for the problem that jbig2 compression loses the orientation. They fixed it and now the image with orientation tag = 8 comes to iText already rotated - and setRotationDegrees is not necessary any more. The setPageSize(PageSize.A4.rotate()) is now sufficient to show the page with the proper orientation in pdf.
Thanks a lot for everything ! Giuseppe. Ps. I have been surprised on how easy has bee to include a multipage jbig2 stream and symbol table with iText .... Paulo Soares wrote: > > > ----- Original Message ----- > From: "beppecosta" <[EMAIL PROTECTED]> > To: <itext-questions@lists.sourceforge.net> > Sent: Tuesday, February 20, 2007 10:32 AM > Subject: Re: [iText-questions] Tiff orientation > > >> >> Paulo, >> >> thanks; when importing TIFF image the "getInitialRotation()" tells me >> what >> I >> need. >> >> when importing a multipage JBIG2 image however the "getInitialRotation()" >> always returns 0.0 probably because it get lost during the compression, >> but >> I can save this value before calling the compressor and apply when adding >> the image in iText; then are the "setPageSize(PageSize.A4.rotate())" and >> "img.setRotationDegrees(270)" the correct methods to rotate and show the >> image in landscape ? >> > > Those are the methods to rotate. > > Paulo > >> Thanks. >> >> >> >> Look at Image.getInitialRotation(). >> >> Paulo >> >> ----- Original Message ----- >> From: "beppecosta" <[EMAIL PROTECTED]> >> To: <itext-questions@lists.sourceforge.net> >> Sent: Monday, February 19, 2007 4:28 PM >> Subject: Re: [iText-questions] Tiff orientation >> >> >>> >>> Hi Paulo, >>> >>> When I convert a multipage to jbig2 I save the orientation value and >>> before >>> adding the image I do a setPageSize(PageSize.A4.rotate()) and a >>> img.setRotationDegrees(270) and it seems to work. Page 1 is portrait and >>> page 2 is landscape. >>> >>> But if I leave it in tiff G4 How can I unserstand that page 2 should >>> appear >>> in landscape ? >>> >>> Thanks. >>> Giuseppe. >>> >>> >>> Paulo Soares wrote: >>>> >>>> I saw the tiff and this is a false problem. The option to rotate the >>>> page >>>> is >>>> up to you, all that iText can do is to present the image with the right >>>> orientation based on the tags and it does it well. The example tiff2pdf >>>> shows all the pages in portrait but what it matters is that it shows >>>> the >>>> image in the correct orientation. >>>> >>>> Paulo >>>> >>>> ----- Original Message ----- >>>> From: "Paulo Soares" <[EMAIL PROTECTED]> >>>> To: "Post all your questions about iText here" >>>> <itext-questions@lists.sourceforge.net> >>>> Sent: Monday, February 19, 2007 12:03 PM >>>> Subject: Re: [iText-questions] Tiff orientation >>>> >>>> >>>>> I'll have to see the tiff. >>>>> >>>>> Paulo >>>>> >>>>> ----- Original Message ----- >>>>> From: "beppecosta" <[EMAIL PROTECTED]> >>>>> To: <itext-questions@lists.sourceforge.net> >>>>> Sent: Monday, February 19, 2007 11:16 AM >>>>> Subject: Re: [iText-questions] Tiff orientation >>>>> >>>>> >>>>>> >>>>>> I'm using 1.4.8. >>>>>> >>>>>> I've a test tiff thas has first page in portrait and second page in >>>>>> landscape. >>>>>> But with tiff2pdf both pages are in portrait. >>>>>> >>>>>> Giuseppe. >>>>>> >>>>>> >>>>>> Paulo Soares wrote: >>>>>>> >>>>>>> The orientation tag is supported. You may be using an old iText >>>>>>> version. >>>>>>> >>>>>>> Paulo >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "beppecosta" <[EMAIL PROTECTED]> >>>>>>> To: <itext-questions@lists.sourceforge.net> >>>>>>> Sent: Friday, February 16, 2007 3:57 PM >>>>>>> Subject: [iText-questions] Tiff orientation >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> I have a multipage tiff that contains in mixed order portrait and >>>>>>>> landscape >>>>>>>> pages. >>>>>>>> Each tiff has the Orientation tag (274) set to 1 for portrait and 6 >>>>>>>> for >>>>>>>> landscape. >>>>>>>> How can I set the rotation in order to see the page rotated in pdf >>>>>>>> ? >>>>>>>> I've tried to rotate the page with setPageSize and the image wit >>>>>>>> setRotation, but the resulting image does not appear very clear. >>>>>>>> Thanks. >>>>>>>> Giuseppe. >>>>>>>> -- >>>>>>>> View this message in context: >>>>>>>> http://www.nabble.com/Tiff-orientation-tf3240218.html#a9006907 >>>>>>>> Sent from the iText - General mailing list archive at Nabble.com. >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------------------- >>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>>>> share >>>>>>>> your >>>>>>>> opinions on IT & business topics through brief surveys-and earn >>>>>>>> cash >>>>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>>>>>>> _______________________________________________ >>>>>>>> iText-questions mailing list >>>>>>>> iText-questions@lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>>>>> Buy the iText book: http://itext.ugent.be/itext-in-action/ >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------- >>>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>>> share >>>>>>> your >>>>>>> opinions on IT & business topics through brief surveys-and earn cash >>>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>>>>>> _______________________________________________ >>>>>>> iText-questions mailing list >>>>>>> iText-questions@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>>>> Buy the iText book: http://itext.ugent.be/itext-in-action/ >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/Tiff-orientation-tf3240218.html#a9040602 >>>>>> Sent from the iText - General mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------- >>>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>>> share >>>>>> your >>>>>> opinions on IT & business topics through brief surveys-and earn cash >>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>>>>> _______________________________________________ >>>>>> iText-questions mailing list >>>>>> iText-questions@lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>>> Buy the iText book: http://itext.ugent.be/itext-in-action/ >>>>> >>>>> >>>>> ------------------------------------------------------------------------- >>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>> share >>>>> your >>>>> opinions on IT & business topics through brief surveys-and earn cash >>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>>>> _______________________________________________ >>>>> iText-questions mailing list >>>>> iText-questions@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>>> Buy the iText book: http://itext.ugent.be/itext-in-action/ >>>> >>>> >>>> ------------------------------------------------------------------------- >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to share >>>> your >>>> opinions on IT & business topics through brief surveys-and earn cash >>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>>> _______________________________________________ >>>> iText-questions mailing list >>>> iText-questions@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>> Buy the iText book: http://itext.ugent.be/itext-in-action/ >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Tiff-orientation-tf3240218.html#a9045067 >>> Sent from the iText - General mailing list archive at Nabble.com. >>> >>> >>> ------------------------------------------------------------------------- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share >>> your >>> opinions on IT & business topics through brief surveys-and earn cash >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> iText-questions mailing list >>> iText-questions@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>> Buy the iText book: http://itext.ugent.be/itext-in-action/ >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> iText-questions mailing list >> iText-questions@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/itext-questions >> Buy the iText book: http://itext.ugent.be/itext-in-action/ >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Tiff-orientation-tf3240218.html#a9058425 >> Sent from the iText - General mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> iText-questions mailing list >> iText-questions@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/itext-questions >> Buy the iText book: http://itext.ugent.be/itext-in-action/ > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ > > -- View this message in context: http://www.nabble.com/Tiff-orientation-tf3240218.html#a9396511 Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/