PDFBox
  1. PDFBox
  2. PDFBOX-1177

Create a module with examples instead having them in pdfbox.jar

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.7.0
    • Component/s: Utilities
    • Labels:

      Description

      The package org.apache.pdfbox.examples (and its subpackage) contains examples on how to use pdfbox.

      The size of these classes in the generated jar not so big (100 kb, 3% of the size), but it is a first step in reduction of pdfbox jar size.

      Moreover, it would be easier to add examples depending on preflight in a separate jar.

      If there is enough vote, I can do it.

        Issue Links

          Activity

          Hide
          Thomas Chojecki added a comment -

          +1

          I build my pdfbox.jar at my own only using the stripped src without additional resources and got a handy size between 900kb and 1 MB.

          Show
          Thomas Chojecki added a comment - +1 I build my pdfbox.jar at my own only using the stripped src without additional resources and got a handy size between 900kb and 1 MB.
          Hide
          Guillaume Bailleul added a comment -

          Can you share in a comment how you do that ? what do you skip ?

          I am interested in the result...

          Show
          Guillaume Bailleul added a comment - Can you share in a comment how you do that ? what do you skip ? I am interested in the result...
          Hide
          Andreas Lehmkühler added a comment - - edited

          Sounds like a part of an idea which already arised some time ago.

          +1 go ahead

          Show
          Andreas Lehmkühler added a comment - - edited Sounds like a part of an idea which already arised some time ago. +1 go ahead
          Hide
          Guillaume Bailleul added a comment -

          I prepared a patch that :

          • create a module "examples" (like app, war, parent)
          • name the new artefact pdfbox-examples and build it as a jar (not bundle)
          • move o.a.p.examples and subpackage to the new module

          If all this is OK for you, i will commit it on tuesday evening.

          Show
          Guillaume Bailleul added a comment - I prepared a patch that : create a module "examples" (like app, war, parent) name the new artefact pdfbox-examples and build it as a jar (not bundle) move o.a.p.examples and subpackage to the new module If all this is OK for you, i will commit it on tuesday evening.
          Hide
          Guillaume Bailleul added a comment -

          Did it in 2 times :

          • r1211081 : creating module examples
          • r1211082 : removing examples from pdfbox
          Show
          Guillaume Bailleul added a comment - Did it in 2 times : r1211081 : creating module examples r1211082 : removing examples from pdfbox
          Hide
          Guillaume Bailleul added a comment -

          Done

          with one last commit to change artifact name (r1211086)

          Show
          Guillaume Bailleul added a comment - Done with one last commit to change artifact name (r1211086)
          Hide
          Guillaume Bailleul added a comment -

          failed to remove files

          Show
          Guillaume Bailleul added a comment - failed to remove files
          Hide
          Guillaume Bailleul added a comment -

          Fixed in r1211172

          Show
          Guillaume Bailleul added a comment - Fixed in r1211172
          Hide
          Guillaume Bailleul added a comment -

          files were empty and not removed

          Show
          Guillaume Bailleul added a comment - files were empty and not removed
          Hide
          Thomas Chojecki added a comment -

          @Guillaume Bailleul
          Sorry for the late response

          Maybe it won't help you much but we use the sources from follow packages

          ./org/
          ./org/apache
          ./org/apache/pdfbox
          ./org/apache/pdfbox/cos
          ./org/apache/pdfbox/pdfviewer
          ./org/apache/pdfbox/examples
          ./org/apache/pdfbox/examples/fdf
          ./org/apache/pdfbox/examples/pdmodel
          ./org/apache/pdfbox/examples/persistence
          ./org/apache/pdfbox/examples/signature
          ./org/apache/pdfbox/examples/util
          ./org/apache/pdfbox/exceptions
          ./org/apache/pdfbox/filter
          ./org/apache/pdfbox/pdmodel
          ./org/apache/pdfbox/pdmodel/fdf
          ./org/apache/pdfbox/pdmodel/font
          ./org/apache/pdfbox/pdmodel/text
          ./org/apache/pdfbox/pdmodel/documentinterchange
          ./org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure
          ./org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf
          ./org/apache/pdfbox/pdmodel/documentinterchange/prepress
          ./org/apache/pdfbox/pdmodel/documentinterchange/markedcontent
          ./org/apache/pdfbox/pdmodel/common
          ./org/apache/pdfbox/pdmodel/common/filespecification
          ./org/apache/pdfbox/pdmodel/common/function
          ./org/apache/pdfbox/pdmodel/interactive
          ./org/apache/pdfbox/pdmodel/interactive/annotation
          ./org/apache/pdfbox/pdmodel/interactive/viewerpreferences
          ./org/apache/pdfbox/pdmodel/interactive/form
          ./org/apache/pdfbox/pdmodel/interactive/pagenavigation
          ./org/apache/pdfbox/pdmodel/interactive/measurement
          ./org/apache/pdfbox/pdmodel/interactive/digitalsignature
          ./org/apache/pdfbox/pdmodel/interactive/documentnavigation
          ./org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline
          ./org/apache/pdfbox/pdmodel/interactive/documentnavigation/destination
          ./org/apache/pdfbox/pdmodel/interactive/action
          ./org/apache/pdfbox/pdmodel/interactive/action/type
          ./org/apache/pdfbox/pdmodel/edit
          ./org/apache/pdfbox/pdmodel/markedcontent
          ./org/apache/pdfbox/pdmodel/graphics
          ./org/apache/pdfbox/pdmodel/graphics/xobject
          ./org/apache/pdfbox/pdmodel/graphics/optionalcontent
          ./org/apache/pdfbox/pdmodel/graphics/predictor
          ./org/apache/pdfbox/pdmodel/graphics/color
          ./org/apache/pdfbox/pdmodel/encryption
          ./org/apache/pdfbox/pdfparser
          ./org/apache/pdfbox/encoding
          ./org/apache/pdfbox/encoding/conversion
          ./org/apache/pdfbox/io
          ./org/apache/pdfbox/encryption
          ./org/apache/pdfbox/pdfwriter
          ./org/apache/pdfbox/persistence
          ./org/apache/pdfbox/persistence/util
          ./org/apache/pdfbox/util
          ./org/apache/pdfbox/util/operator
          ./org/apache/pdfbox/util/operator/pagedrawer

          Compile with the needed jars (like bc, fontbox, jempbox, etc.)
          and build the final jar without resources and dependencies.

          Parsing work well. We use it for sign and verify purpose only. It's just a lightweight lib with basic functions

          Show
          Thomas Chojecki added a comment - @Guillaume Bailleul Sorry for the late response Maybe it won't help you much but we use the sources from follow packages ./org/ ./org/apache ./org/apache/pdfbox ./org/apache/pdfbox/cos ./org/apache/pdfbox/pdfviewer ./org/apache/pdfbox/examples ./org/apache/pdfbox/examples/fdf ./org/apache/pdfbox/examples/pdmodel ./org/apache/pdfbox/examples/persistence ./org/apache/pdfbox/examples/signature ./org/apache/pdfbox/examples/util ./org/apache/pdfbox/exceptions ./org/apache/pdfbox/filter ./org/apache/pdfbox/pdmodel ./org/apache/pdfbox/pdmodel/fdf ./org/apache/pdfbox/pdmodel/font ./org/apache/pdfbox/pdmodel/text ./org/apache/pdfbox/pdmodel/documentinterchange ./org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure ./org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf ./org/apache/pdfbox/pdmodel/documentinterchange/prepress ./org/apache/pdfbox/pdmodel/documentinterchange/markedcontent ./org/apache/pdfbox/pdmodel/common ./org/apache/pdfbox/pdmodel/common/filespecification ./org/apache/pdfbox/pdmodel/common/function ./org/apache/pdfbox/pdmodel/interactive ./org/apache/pdfbox/pdmodel/interactive/annotation ./org/apache/pdfbox/pdmodel/interactive/viewerpreferences ./org/apache/pdfbox/pdmodel/interactive/form ./org/apache/pdfbox/pdmodel/interactive/pagenavigation ./org/apache/pdfbox/pdmodel/interactive/measurement ./org/apache/pdfbox/pdmodel/interactive/digitalsignature ./org/apache/pdfbox/pdmodel/interactive/documentnavigation ./org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline ./org/apache/pdfbox/pdmodel/interactive/documentnavigation/destination ./org/apache/pdfbox/pdmodel/interactive/action ./org/apache/pdfbox/pdmodel/interactive/action/type ./org/apache/pdfbox/pdmodel/edit ./org/apache/pdfbox/pdmodel/markedcontent ./org/apache/pdfbox/pdmodel/graphics ./org/apache/pdfbox/pdmodel/graphics/xobject ./org/apache/pdfbox/pdmodel/graphics/optionalcontent ./org/apache/pdfbox/pdmodel/graphics/predictor ./org/apache/pdfbox/pdmodel/graphics/color ./org/apache/pdfbox/pdmodel/encryption ./org/apache/pdfbox/pdfparser ./org/apache/pdfbox/encoding ./org/apache/pdfbox/encoding/conversion ./org/apache/pdfbox/io ./org/apache/pdfbox/encryption ./org/apache/pdfbox/pdfwriter ./org/apache/pdfbox/persistence ./org/apache/pdfbox/persistence/util ./org/apache/pdfbox/util ./org/apache/pdfbox/util/operator ./org/apache/pdfbox/util/operator/pagedrawer Compile with the needed jars (like bc, fontbox, jempbox, etc.) and build the final jar without resources and dependencies. Parsing work well. We use it for sign and verify purpose only. It's just a lightweight lib with basic functions
          Hide
          Thomas Chojecki added a comment -

          // Edit
          I need to correct me
          we exclude the examples while building the jar.

          Show
          Thomas Chojecki added a comment - // Edit I need to correct me we exclude the examples while building the jar.

            People

            • Assignee:
              Guillaume Bailleul
              Reporter:
              Guillaume Bailleul
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development