Datalogics PDF Java Toolkit 6.1.1, new samples, Java dependencies and OSGi

Datalogics PDF Java Toolkit 6.1.1, new samples, Java dependencies and OSGi

Our last release of our PDF Java Toolkit was 4.7.0 and since then we have been working hard on making updates to the core of PDF Java Toolkit as well as the samples that go with it. This is a major release for us (as you can see by the change in the version number) and we have gone through a number of internal releases and trials with some of our heaviest users to ensure that it is ready for use. Let’s take a look at what has changed!

Datalogics PDF Java Toolkit 6.1.1 is made up of

  • PDF Java Toolkit Core 3.2.0
  • Talkeetna 5.0.2

You can find the full release notes at the bottom of this article, here are some of the highlights, though.

Java dependencies and OSGi support

We have updated PDF Java Toolkit Core and Talkeetna to have real dependencies and have removed the pdfjt-support.jar that we had been shipping. This allows our users to resolve dependencies on their own and should help prevent any collisions between dependencies that Datalogics PDF Java Toolkit has and the applications it is being used in. We believe that following the practices and knowledge of the Java community is a better path forward than bundling everything into a couple of fat jars.

This has helped us provide OSGi support with PDF Java Toolkit Core out of the box. Before users would have to create the bundle themselves out of what we ship and now PDF Java Toolkit Core is an OSGi compliant JAR file.

Best practice samples

Over these last few years, we have received mixed reviews of the samples that we shipped with Datalogics PDF Java Toolkit. Some people told us they were easy to use and learn from, others told us they were too complex and there were just too many of them to look through. With this release of Datalogics PDF Java Toolkit, we have reworked the samples and are extremely proud of what we are calling our “best practice samples”.

We have trimmed the number of samples down to 12 initially and will be adding more as we move forward with this revised set. These initial 12 samples will ship as part of Datalogics PDF Java Toolkit and are also now available on GitHub as a public repository. We have worked really hard to provide a set of samples that show how to do some of the common tasks that users ask about as well as sharing as much educational information about the PDF standard while following best practices of the Java community. We would love to hear your feedback and we would love it even more if you helped us out by contributing to the new samples repository! If you have written code that uses Datalogics PDF Java Toolkit and demonstrates something we do not have a sample for yet, send us a pull request with it! If you don’t think we are following best practices for something, open an issue and let us know what we are doing wrong so we can fix it!

We need help from our users to drive Datalogics PDF Java Toolkit forward and make it the PDF library for Java and other JVM languages!

PDF Java Toolkit Core 3.2.0 release notes (aggregate of release notes since last public release)

  • The RedactionService applyRedaction method now throws a PDFUnsupportedFeatureException when attempting to redact a dynamic XFA document.
  • PDF content streams containing an unusually long numeric object no longer cause an ArrayIndexOutOfBounds exception.
  • When resources are included multiple times they will now be properly removed when freeing duplicate resources.
  • The ReadingOrderTextExtractor, LayoutModeTextExtractor, and TextExtractor newInstance methods now throw a PDFUnsupportedFeatureException when attempting to use with a dynamic XFA document.
  • PDFAnnotationRedaction.setInteriorColor(double, double, double) is now deprecated and has been replaced with versions more consistent with similar methods in PDF Java Toolkit.
  • An exception will now be thrown when trying to rasterize a shell XFA file.
  • Fixed ParseOps.skipWhitespace() to return a single space rather than the last character of the stream.
  • Added ASRectangle.swapDims() to switch height and width dimensions of a given ASRectangle.
  • A more meaningful exception will be thrown for garbled color spaces in content streams.
  • An exception will now be thrown when there is a problem extracting text, rather than silently losing text.
  • Exclude org.apache.commons.collections4.iterators from OSGi imports.
  • PDFJT core JAR is now an OSGi bundle; the jar file produced by the build is now OSGi compliant.
  • Add impl classes and packages to javadocs.
  • Include PDFAConversionOptionsFactory class that has a method that returns a PDFAConversionOptions Object pre-configured to conform to the PDF/A-1b standard.
  • The pdfjt-support jar is no more. It has been replaced by Maven dependencies and by some of its contents being rolled into the pdfjt jar.
  • Include a Pre-Configured PDF/A-1b Conversion handler that has default document conversion and validation processing settings so that a user customized handler is not needed when converting a PDF to PDF/A-1b.
  • ARGBImage#ConvertToRGB() will now throw a more descriptive exception when it can’t properly read the colorspace data of an image.
  • The NeedAppearances key is removed from the form only once.
  • Signature field will display the user name from the signatureOptions’ user info if it is set
  • Throw PDFUnsupportedFeatureException when trying to rasterize a dynamic XFA rather than silently generating blank output.
  • Throw PDFUnsupportedFeatureException when trying to flatten Dynamic XFA instead of a generic error message in the output PDF.
  • Fixes an issue where PDFPage#nextPage would skip by two pages at a time.
  • Remove ‘getting started’ docs that are no longer being maintained.
  • When creating a new instance of a PDFFontDescriptor, instead of estimating the ascent and descent lines based on the font’s bounding box, those values will now be right out of the font’s FontData.
  • DCTDecode output filter is added so that PDFJT can save images that have the DCTDecode filter.
  • Resampled images with DeviceCMYK color space are no longer inverted after resampling.

Talkeetna 5.0.2 release notes (aggregate of release notes since last public release)

  • Talkeetna now has its own license managed version, necessitating the major version change.
  • Added saveLinearAndClose() methods to DocumentHelper.
  • Eliminate use of pdfjt-support

Learn more about PDF Java Toolkit and start your free evaluation today.

2 thoughts on “Datalogics PDF Java Toolkit 6.1.1, new samples, Java dependencies and OSGi

  1. Hello,

    I’ve looked at the pdf printing example and … why it has to be so complicated ?

    Seriously, why do we have to deal with PrintJob, PrinterResolution, FontSetLoader, RasterizationOptions and have to implement an incomprehensible Printable interface ?

    I was expecting something much simpler like:
    new PDFDocument(pdfFileUrl).print(printerName).

    That is what 99% of the people want to do. Just print a pdf file on a given printer like Acrobat would do with the default parameters…

    Just wrap all this stuff in a simple print method.

    1. Thank you for the feedback, we are always looking for ways to improve our APIs to make them easier to use and to match customers expectations. If you would like to propose that we implement something like your suggestion, please suggest it here http://feedback.datalogics.com/forums/331356-datalogics-pdf-java-toolkit

      We certainly can make this functionality simpler for our customers and will take it under consideration for future versions of our PDF Java Toolkit.

      The print pdf sample is built so that it is flexible as we have customers with many different use cases, some of them want more control, some of them want less control. With PDF Java Toolkit, we are trying to bring the best practices for working with PDF together with the best practices for working with Java.

Leave a Reply

Your email address will not be published. Required fields are marked *