You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2008/09/30 22:57:47 UTC

[jira] Created: (PDFBOX-381) Remove direct JAI dependency

Remove direct JAI dependency
----------------------------

                 Key: PDFBOX-381
                 URL: https://issues.apache.org/jira/browse/PDFBOX-381
             Project: PDFBox
          Issue Type: Improvement
          Components: PDModel
            Reporter: Jukka Zitting
            Priority: Blocker
             Fix For: 0.8.0-incubator


As noted during the license review (PDFBOX-366), we can't have the Java Advanced Imaging (JAI) libraries included in Apache PDFBox.

One alternative would be to require downstream users to explicitly download the required JAI libraries from Sun and place them in the lib directory before building PDFBox. That's quite cumbersome, so I looked at how tightly integrated PDFBox is with the JAI libraries.

It turns out that only two classes in PDFBox (PDPage and PDCcitt) have direct dependencies to the JAI libraries. The PDPage dependency is used for rotating the page image, and the PDCcitt dependency for parsing a tiff image.

I believe both of these dependencies can be replaced with functionality or interfaces available in standard JDK 1.4. See the attached patch for the proposed changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PDFBOX-381) Remove direct JAI dependency

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved PDFBOX-381.
----------------------------------

    Resolution: Fixed
      Assignee: Jukka Zitting

Committed the proposed patch in revision 703260.

PS. Strictly speaking I'm not a normal PDFBox committer, so I would rather avoid making too many technical decisions for the project. However, since this issue is tightly linked with license policies at Apache and since there has been no other activity on this I decided to extend my mentor role to cover a code change like this.

> Remove direct JAI dependency
> ----------------------------
>
>                 Key: PDFBOX-381
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-381
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>            Reporter: Jukka Zitting
>            Assignee: Jukka Zitting
>            Priority: Blocker
>             Fix For: 0.8.0-incubator
>
>         Attachments: pdfbox-nojai.patch
>
>
> As noted during the license review (PDFBOX-366), we can't have the Java Advanced Imaging (JAI) libraries included in Apache PDFBox.
> One alternative would be to require downstream users to explicitly download the required JAI libraries from Sun and place them in the lib directory before building PDFBox. That's quite cumbersome, so I looked at how tightly integrated PDFBox is with the JAI libraries.
> It turns out that only two classes in PDFBox (PDPage and PDCcitt) have direct dependencies to the JAI libraries. The PDPage dependency is used for rotating the page image, and the PDCcitt dependency for parsing a tiff image.
> I believe both of these dependencies can be replaced with functionality or interfaces available in standard JDK 1.4. See the attached patch for the proposed changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-381) Remove direct JAI dependency

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated PDFBOX-381:
---------------------------------

    Attachment: pdfbox-nojai.patch

Proposed patch. This patch replaces the image rotation code with an equivalent java.awt.image.AffineTransformOp operation and does TIFF parsing through the javax.imageio.ImageIO interface.

Note that the TIFF parsing functionality is only available in ImageIO if the user has installed appropriate extensions (for example from JAI). However, with this change such extensions are only needed at runtime when the related functionality is used, not at compile time for all uses of PDFBox. 

This code is NOT TESTED, as I don't have (or know how to make) good test PDFs for these features.

> Remove direct JAI dependency
> ----------------------------
>
>                 Key: PDFBOX-381
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-381
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>            Reporter: Jukka Zitting
>            Priority: Blocker
>             Fix For: 0.8.0-incubator
>
>         Attachments: pdfbox-nojai.patch
>
>
> As noted during the license review (PDFBOX-366), we can't have the Java Advanced Imaging (JAI) libraries included in Apache PDFBox.
> One alternative would be to require downstream users to explicitly download the required JAI libraries from Sun and place them in the lib directory before building PDFBox. That's quite cumbersome, so I looked at how tightly integrated PDFBox is with the JAI libraries.
> It turns out that only two classes in PDFBox (PDPage and PDCcitt) have direct dependencies to the JAI libraries. The PDPage dependency is used for rotating the page image, and the PDCcitt dependency for parsing a tiff image.
> I believe both of these dependencies can be replaced with functionality or interfaces available in standard JDK 1.4. See the attached patch for the proposed changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.