CHANGELOG for Big Faceless PDF library -------------------------------------- The version numbering scheme in use across all our products is designed to simplify upgrade management for developers: * A "patch level" change indicates a minor feature or bugfix. Methods MAY have been added to the API, but none have been removed. eg. Code written for version 1.0.0 will work on version 1.0.9 * A "minor level" change indicates a change to the API which may require some code changes. API changes are minor, but are necessary for bug fixes or new features. eg. Code written for version 1.0.3 MAY require changes for 1.1 * A "major level" indicates big changes to the API or considerable extra functionality. Developers can expect significant changes to bring their code up to date. eg. Code written for version 1.1 is unlikely to work under 2.0 ----------------------------------------------------------------------------- 2.11 (released 2008-12-15) ------------------------------- * INCOMPATIBLE CHANGE: For RadioButtons and CheckBoxes, the "value" is now equal to the name given the field in Acrobat, rather than it's internal value (although these are often the same). This allows multiple radio buttons with the same name to function correctly, and better reflects what Acrobat does. WidgetAnnotation.get/setTextValue now simply call get/setValue. * INCOMPATIBLE CHANGE (Viewer): Digital Signature signing and verification in the Viewer has been rewritten to use the "SignatureProvider" class, allowing use of multiple signature factories, RFC3161 Timestamping servers and so on, most of which can be controlled by system properties. The default KeyStore is now the Java default, the users ".keystore" file, and the system keystore is automatically used for verification. * INCOMPATIBLE CHANGE (Viewer): The SuperJOptionPane class has been deprecated and will be removed shortly. Customers extending the Viewer should use the "Util" class to display error dialogs instead. * Moved the appearances for AnnotationStamp objects to a new "bfopdf-stamp.jar" file, as part of continuing efforts to reduce the size of the main Jar. This new Jar must be added to the classpath if AnnotationStamp objects are created. * Added 256-bit AES encryption to StandardEncryptionHandler, new in Acrobat 9. * Fixed incorrect encoding of some fonts in forms after a read/write * Added support for regular expression matching in PageExtractor * Added setBackgroundStyle() and methods to support rich text to AnnotationText class. * Fixed rendering of some CMYK JPEG images * Parallelized part of the render() method, for faster rendering on multi-core machines. * Improvements to the way elements are managed in a Form, to handle cases where people are removing and adding fields with the same name. * Fixes to RemoteSignatureHandler, and added support for this to the viewer. * Fixed infinite loop in rare corrupt documents * More JavaScript fixes to support Adobe's {key:value} method call syntax. * Fixed HYGoThic-Medium font support, broken a couple of releases back * Viewer: big improvements to the Free Text annotation widget, and annotations can now be resized. * Viewer: Fixed precision errors when moving annotations and fixed opacity bug, for less redrawing. * Viewer: Improvements to TextHighlighter class to work with regular expressions * Viewer: Created public constructors for all non-singleton features. * Viewer: improved color selection dialog 2.10.6 (released 2008-11-10) ------------------------------- * Fixed signing PDFs rendered with Compressed XRef tables * Fixed loading Compressed XRef PDFs with stream Length contained in an ObjStm * Fixed bug in PDFFont.getTextBottom(), added in 2.10.4 * Fixed handling of RadioButtons with "Opts" array - corrected WidgetAnnotation and FormRadioButton.getValue() and added WidgetAnnotation.set/isSelected(). * Rewrote JavaScript again, for what we now feel is a broken JSR 223 in Java 6. * Handle PDFs with invalid odd-length Named Action trees. * Flattening an XFA Form no longer produces an invalid PDF - the XFA is removed. * Don't fail in linearization if open action refers to a deleted page * Viewer: fixed a number of form field JavaScript Event problems. * Viewer: a thread which was preventing a a process exiting after the viewer was closed has been fixed. * Viewer: FormNNNWidgetFactory constructors are now protected, for subclassers. 2.10.5 (released 2008-10-21) ------------------------------- * Fixed memory leak which occured when a PDF had part of it's internal structure replaced. Leak was on a per-PDF basis so would not expand infinitely over time, but while that PDF existed, editing it could take more memory than it actually required. All customers are encouraged to upgrade. * Fixed creation of signature annotations for Acrobat 9. * Improvements to the "MergeResources" feature added in the previous release. * Fixed redraw of fields with multiple annotations in the viewer. * Fixed JavaScript bugs evaluating "event.target", "event.source" and setting "event.change" and "event.value" in Keystroke events. * Fixed Lucene extraction failure on some PDFs with Annotations * Added support for Template pages via the PDF.getPage(String) method * Several further enhancements to the JavaScript DOM. 2.10.4 (released 2008-10-07) ------------------------------- * Large internal rewrite of font handling now correctly renders some edge cases that weren't handled before, and improves font substitution for CJK fonts. * Added OutputProfile.Feature.MergeResources, which will attempt to merge duplicate resources such as fonts and images when concatenating multiple PDF files. * Added "Intelligent Mail" BarCodes, the next generation of USPS routing code. * OpenTypeFonts containing CFF outlines now have the correct sizes returned from getTextTop/getTextBottom(). * XFA-only PDFs can now have their XFA data updated via Form.setXFADataSets(). * Fixed bug in PDFPatterns with a background color, introduced in 2.10 * Soft-hyphen characters now fit correctly in LayoutBox objects * Fixed case where counter-signing an existing signed PDF could cause the original signature to be invalidated. * Fixes to JavaScript so "this" correctly refers to the Doc object in events. * Fixed rare case where PDFPage.drawPolygon() could create an invalid PDF. * Fixed NullPointerException when cloning a newly-created PDF containing open streams. * Added PropertyChangeEvents to FormElement and PDFAnnotation * Viewer: Added MultiPageDocumentViewport, and a number of internal improvements to the way pages are rendered. * Viewer: Fixed redraw of calculated form fields * Viewer: Added "OpenRecent" menu * Viewer: Fixed export of PKCS#12 files. * Viewer: Improved icons, improved toolbar layout (Windows only), added horizontal mousepad scrolling (OS X only), improved widgets (OS X only). 2.10.3 (released 2008-07-15) ------------------------------- * Added the ability to write Linearized (also known as "web optimized") PDF's. Simply set the "OutputProfile.Feature.Linearized" to required when rendering. * Rewrote the PageExtractor class completely - now faster, better and working with rotated documents. * Fixed a problem causing increased memory usage when using a PDFReader in a single thread. The difference can be significant, so anyone in this situation is encouraged to upgrade. * Viewer: Significant improvements to behaviour and appearance, giving more reliable results across the board. All users are encouraged to upgrade * Viewer: Added text search and selection. * Viewer: Changes to the SidePanel class so a factory is no longer required. * Big speed increase rendering JPEG images with ICC ColorSpaces and all images with non-ICC CMYK ColorSpaces. * Fixed Java 1.6 JavaScript (broken in 2.10.2) and JavaScript Date formatting. * Fixed missing kerning when drawing kerned text into an area of exactly the right width, causing the text to extend slightly too far. Also fixed return from LayoutBox.getNumberOfLines, which was always one too high. * Reduced memory footprint when sharing OpenType fonts across multiple PDFs * Added BarCode.setColor() method * Fixed some minor rendering issues wth certain CFF and OpenType glyphs * Setting the System property for a warning to "fatal" will make those warnings throw an exception - eg "org.faceless.pdf2.warning.JB2=fatal" 2.10.2 (released 2008-04-30) ------------------------------- * Automatically subset any possible OpenType fonts when flattening a form. * Fixed occasional bug when encrypting documents - under some circumstances a corrupt PDF could be created. * Importing some types of FDF resulted in a corrupt PDF - fixed. * Fixed exception when a FormTextButton Widget has a null value. * Added ability to set/clear "DoNotSpellCheck" flag on FormText fields. * Fixed parsing of some BMP images that were broken in 2.10. * Fixed Exception thrown when incorrectly merging PDF's with form fields - a PG1 warning is displayed, as was the case prior to 2.10. * Removed public finalize methods - these should have been protected. * Cache inline images, to speed up rendering pages containing Type3 fonts. * Fixed rendering problems with colours containing alpha values, and finally worked around the Java bug causing "blueing" of white colors in calibrated RGB colorspaces. * Added setInkBleed method to BarCode class, to handle print processes that distort the size of the bar. * Fixed turning off Checkbox annotations with XFA * Fixed appearance of StrikeOut annotations * Handle buggy PDFs created by Actuate PDF Converter 1.0 and Ad Lib's "EX317". * Improved CJK font substitution in Debian-based Linux. * Viewer: the Thumbnail panel can be used to reorder the PDF or merge pages from other PDFs, directly from the viewer or by dragging PDF or image files into the panel. * Viewer: new features can be added to the viewer automatically by specifying the "org.faceless.pdf2.viewer2.ViewerFeature" service in the Jar. See http://java.sun.com/j2se/1.4.2/docs/guide/sound/programmer_guide/chapter13.html * Viewer: added mnemonics to the menu items. * Viewer: bitmap images can now be imported directly into the PDF viewer, due to the new generic Importer/Exporter framework. * Viewer: various smaller improvements: * Ability to drag the URL of a PDF onto the viewer to load * Improvements to LookAndFeel in GTK+, Metal and Motif. 2.10.1 (released 2008-02-14) ------------------------------- * This release fixes problems some customers been having with the NIO changes in 2.10. Java bug 4724038 has been causing problem with OutOfMemory errors in some environments, and customers on Windows were unable to read a PDF then write it back to the same file. This release no longer uses the problematic MappedByteBuffer class, and doesn't hold the stream open when loading a PDF from a FileInputStream (the same as for 2.9). The only area where upgrading may require changes is for customers reading multi-page TIFF images from a File using a PDFImageSet: the FileInputStream should not be closed until after the last call to getImage(). * Removed a reference to the last PDF edited, allowing it to be gc'ed earlier and so reducing the working memory footprint of the library. * Fixed some image parsing bugs with transparent GIF images added in 2.10 2.10 (released 2008-02-06) ------------------------------- * INCOMPATIBLE CHANGE: BarCode class has been rewritten. You now create all Barcodes (including those that were formerly subclasses) by calling one of the static factory methods, then drawing the canvas returned by getCanvas(). Fixed return value from getHeight() and added getMinimumHeight(). * INCOMPATIBLE CHANGE: Customers implementing their own EncryptionHandler or SignatureHandler will need to take note of some API changes. For signing, see the new getMessageDigest() and sign() methods, and for encryption note the new getEncryptionStream() and getDecryptionStream() methods. * Huge improvements to memory use across the board, mainly when loading objects (including PDFs) from a File or FileInputStream. NIO is used and the File acts as a backing store, giving a drastic reduction on memory footprint for large PDFs. However it means the file the PDF was loaded from is now kept open until the PDF object and its children are garbage collected. * Big speed improvements when reading and writing PDFs. Reading has been parallelized to make use of multi-core environments - the number of threads can be set explicitly with the "org.faceless.pdf2.Threads" System property. * Added option to parallelize TIFF rendering in PDFParser.writeAsTIFF(). * Applying a Digital Signature has been improved from a two-pass operation to almost a single pass one even when not rendering to a File - reducing memory footprint and increasing speed. * Added PDFStyle.setOverprint() method to turn on/off overprinting. * Added support for SHA384, SHA512 and RIPEMD160 Signature message digests. * Added new WidgetAnnotation.setButtonImage(), to position image on the button. * Fixed print scaling when printing to paper that doesn't match the page size. * Fixed creation of PDFCanvas from rotated pages. * Added DragScroll, ZoomSelection and AnnotationTextFactory to the viewer. * Added French, German, Japanese, Chinese translations to the viewer. * Added PDFA1b_2005_Acrobat OutputProfile, for Acrobat's version of PDF/A. * Many smaller fixes, including: * Handle CID fonts with zero-length rather than missing CID->GID mappings * PDFBookmark loading/saving speed improvements * Don't crash on broken ToUnicode streams * Don't eat/choke on junk on the operator stack when rendering text * AnnotationMarkup creation wasn't creating valid appearances * Removed incorrect Aleph-Lam ligature when rendering Hebrew * Corrected ToUnicode parsing of "compact" bfrange objects * Scrolling/GoTo actions at high zoom in the PDFViewer were mispositioning * Fixed input to PDFAction.goToFitRectangle() and output from getRectangle() * Fixed added for some old CCITT.G3 TIFF images * Applying OutputProfile.AcrobatNCompatible updates the PDF version 2.9 (released 2007-11-21) ------------------------------- * POSSIBLY INCOMPATIBLE CHANGE: A number of changes have been made to FormChoice, mostly under the hood unless you're working on the Map returned by getOptions, which has keys/values now in the correct order. Also added FormChoice.set/getSelectedIndices(), to set unambiguous values for multi-selection lists. * JavaScript events are now fully implemented, and a basic JavaScript environment is in place in the viewer which mimics Acrobat. This means form validation scripts in PDF documents will likely run. Rhino 1.6r6 or Java 1.6 or later is required to take advantage of this. * Changes to the licensing method to allow License files to gradually replace the old-style "keycode" licensing. All current licenses will continue to work. * Deprecated Event.CLICK, which is now simply a synonym for MOUSEUP * Localization hooks in place for the viewer, and mostly implemented the Spanish translation. * Added support for parsing BMP images in the PDFImage class * Rendering bugs fixed for documents with -ve dash phases, where CropBox is greater than the MediaBox * Fixed calls to nested procedures in PostScript parser, which was causing problems for some fonts and patterns * Fixed display of some rotated pages in Locales with "," as a decimal separator * Improved About dialog and added the "SplashScreen" and "ShowConsole" features 2.8.5 (released 2007-10-17) ------------------------------- * Documents with Reader Extensions (Usage Rights) will have those rights preserved if possible. * Rendering bitmap images in PDFs has been rewritten to support tiling and low-resolution thumbnails. This means documents containing very large images should no longer require an equally large amount of memory to render, and will render much faster at low resolutions. * Added new methods to the PDFViewerApplet class to support LiveConnect, allowing the viewer applet to be communicate with JavaScript. See the PDFViewerApplet API docs for more details. * Added the PropertyManager class, to allow an alternative to the System property method of controlling the PDF library and PDF Viewer - mainly useful when using the PDFViewer in an applet or JWS environment. * Added the ability to create new annotations on a page to the Viewer * Fixed occasional bug when setting text field to multi-line. * Fixed MaxiCode class so a ])> prefix doesn't automatically create a SCM. * Fixed issue where under certain circumstances, an OpenType font used in more than one document could cause exceptions to be thrown when rendering. * Bugfix for PostScript parser to handle some buggy Type1/Type3 fonts. * Still more tweaks to calibrated colors to remove "blueing" of white on some platforms. Now tested and verified on Java 1.4 and above on Windows, Linux and OS X. * JBIG2 images are decoded once only while using the viewer, which should make paging through documents containing those images much quicker. * Worked around Java bug relating to 1-color DeviceN images. * Improvements to StandardEncryptionHandler.getChange() method for PDFs encrypted with 40-bit encryption. 2.8.4 (released 2007-08-20) ------------------------------- * Fixed memory leak occurring when creating new form fields with 2-byte fonts. * Reusing subset 2-byte OpenType fonts across documents now works correctly * Added some fixes to PDF/A document creation and validation. * Fixes for reading byte-aligned Group 4 and some 2D Group 3 CCITT streams. * Fixed inverted 1-bit images for certain unusually constructed PDFs * Fix for some XFA forms wth pageArea objects * Improvements to Swing "Look & Feel" for Viewer on Windows and Linux 2.8.3 (released 2007-08-06) ------------------------------- * Added the KeyStoreManager class to the viewer, which provides a management console for digital keys and certificates. * Added the ability to submit forms to the viewer. Currently HTTP and basic FDF submission are supported. * Added some support methods for form submission to PDFAction and FDF classes. * Added the PDFPage.get/setPageOrientation() method, to quickly rotate a page by 90, 180 or 270 degrees. Also added features to do this to the viewer. * Fix rendering problems with some PDFs containing transparency groups. * Added PublicKeyEncryptionHandler.chooseRecipient() method, to allow subclasses to automatically select a matching key. * Improvements to the Toolbar layout in the viewer * Adjusted the distribution of files between the Jars - many documents should now load without the "qrcode" and "cmap" Jars. 2.8.2 (released 2007-07-09) ------------------------------- * Split the Jar into three parts: "bfopdf.jar", "bfopdf-cmap.jar" and "bfopdf-qrcode.jar". This is intended to ease deployment in Applets and Java Web Start environments. If upgrading from a previous version all three Jars are required to replace the previous "bfopdf.jar" * We now supply a pack200 compressed Jar "bfopdf.jar.pack.gz" for JWS and Applet use, and a sample "bfopdf.jnlp" file for Java Web Start. Updated the "Installation" section of the userguide detailing how to best deploy the library in these environments. * Updated PublicKey support to work with the Sun JCE and AES encryption or unencrypted metadata. Also fixed a bug resulting in truncated strings when reading documents encrypted with AES. * More fixes when moving objects between PDFs, catching a number of RF1 warnings and a potential ConcurrentModificationException in render() * Added option to pass in array of possible EncryptionHandlers to PDFReader, for when you don't know in advance how the document has been encrypted. * Added support for transparency groups when rendering - used when rendering translucent annotations. * Added EncryptionHandler.hasRight() method, to allow EncryptionHandlers to properly manage document usage rights. * Added the "org.faceless.pdf2.DeviceColor" System property, which if set will replace calibrated RGB, CMYK and Gray colorspaces with their uncalibrated equivalents. For documents making heavy use of calibrated colorspaces this will greatly increase rendering speed, possibly at the expense of accurate color reproduction. * Some fixes to XFA parsing * Added FullScreenMode viewer feature, and the ability to load documents encrypted with Public Key encryption using the PDFViewer, via the new viewer2.PublicKeyPromptEncryptionHandler class. * Text extraction to Lucene now requires Lucene 1.9 or greater 2.8.1 (released 2007-06-19) ------------------------------- * Form Fields will now be formatted if possible. Basic formatting is supported, and some JavaScript will work if Java 1.6 or Mozilla Rhino are available. * Improvements to PKCS#7 parsing means verifying signatures should now work with any JCE provder, including IAIK and the default Sun provider * Fixed text wrapping algorithm when track kerning was set * Added TextHighlighter and SignaturePanel viewer features, to mark some text as highlighted and provide an Acrobat-style panel summarizing the digital signatures in a document. * Fixed rendering of some types of Masked images. * Added PageExtractor.getMatchingText(String[]), to find multiple items at once. * Fixed parsing of some symbolic OpenType fonts * Fixed namespace bug in XMP processing that was breaking Resins DOM. * A bug in Windows printing required us to modify the PrintPDF.java example and the printing code in DocumentPanel for reliable results with unusual page sizes. * Fixed bug when extracting text from TrueType fonts with the Symbolic flag set. * Added the ability to selectively decompress/recompress streams compressed with CCITT, JBIG2 and JPX by setting the appropriate OutputProfile.Feature to denied. This may be useful for customers having problems with certain compression algorithms in their workflow. * Fixed default RenderingHints on Linux, *BSD and possibly other UNIX boxes - pages were being rendered without anti-aliasing by default. * Improvements to Info and FormSignedSignatureWidgetFactory viewer features * Fixed duplicate byte order mark when creating some non-ASCII bookmarks * Fixed rendering of linear gradients, brokem in 2.8 * Removed 1.4 specific code - the library will once again run under Java 1.3. 2.8 (released 2007-05-21) ------------------------------- * MAJOR CHANGE: Replaced the "viewer" package with the vastly improved "viewer2". The old viewer package is still available, see "old/README.txt" for more information. * Added two new PDFReader constructors, the PDF.getRenderProgress and PDFParser.getWriteAsTIFFProgress methods, to monitor how long these potentially long running tasks will take from another thread. * Added PagePainter.setPaintAnnotations() and PagePainter.paintAnnotation(), to allow annotations to be painted separately from their parent page. * Added PagePainter.setPageExtractor() method, to run the text extraction while rendering rather than having to do the two sequentially. * StandardEncryptionHandler and PublicKeyEncryptionHandler are no longer final. * Fixed a number of bugs in the show/hide PDFAction. * Added PDFAnnotation().getPopup() * Added Form.getPDF() and PDFPage.getPDF() * Added "ViewBox" and "PrintBox" options to PDFPage.getBox() * Fixed handling of yet another variation of CMYK JPEG images * When merging annotations from an FDF, don't disassociate annotation replies. * Some further fixes to XFA processing * Fixed Form.setXFAElement when the data contained non-ASCII characters * Fixed annotation positioning on rotated pages, broken again in 2.7.9 * Added FormElement.rebuild(), to recreate the form fields annotations if necessary before the PDF is rendered. * Fixed reading of more corrupt PDF variations 2.7.9 (released 2007-04-16) ------------------------------- * Added support for JBIG2 image encoding, via the external "jbig2enc" tool. See http://bfo.co.uk/products/pdf/jbig2 * Corrected values of PDFStyle.get/setFormFieldOrientation() when the field is on a rotated page. * The Form.removeXFA() method wasn't working if the form fields were modified first, and was sometimes colliding with a bug in Acrobat 7 if it was called at any other point. Fixed. * Fixed occasional incorrect RD6 warning about stream lengths * Fixed bug in importFDF for some FDF documents with Popups, and no longer create duplicates of annotations. * Fixed issue when two threads are rendering the same page in PagePainter * Now recognises the view.area and print.area PDF options when rendering pages * Fixed rendering problem with some Pashto and Kirghiz glyphs (06CC 06C7 06D0) 2.7.8 (released 2007-03-15) ------------------------------- * Enhanced the viewer to add the beginnings of mouse interaction with the document. Added EventHandler and it's subclass DefaultEventHandler, which handles mouse clicks on hyperlinks throughout the document. * Improvements to the PageExtractor class - text previously being extracted as individual letters or smaller groups are now being reassembled where possible into longer phrases * Added support for dot/dash patterns, via new PDFStyle.setLineDash() method. * Added support for JBIG2 image decoding, via the external "jbig2dec" tool. See http://bfo.co.uk/products/pdf/jbig2 * Added OpenTypeFont.getEmbeddingRestrictions() method, for users that need to determine whether a font has embedding restrictions or not. * When creating goToRemote actions, you can now specify whether they are to open in a new window or not. Also fixed page numbers, which were out by 1. * Added missing methods to PDFBookmark, to get/set the open status. * Correctly recompress documents using compressed XRef stream when the PDF has been read in rather than created from scratch. * Added OutputProfile.Feature.MaximumCompression, for maximum deflation * Fixed positioning of rotated annotations on rotated pages. Again. * Fix position of text returned from PageExtractor when there's a CropBox set. * Fixed problem when cloning objects then moving them between documents. * XFA loading now handles hidden fields. * PDFCanvas is no longer final. * Better handling of invalid CMaps. 2.7.7 (released 2007-02-05) ------------------------------- * Reduced the number and size of temporary objects allocated when reading a PDF, and reduced the number of intern() Strings to lessen the load on the PermGen space. * Added an option not to intern() dictionary keys. This slows things down but may reduce long-term memory requirements for some users. Details are in Appendix B of the userguide. * Now handles inline images with Indexed Colorspaces, and correctly renders 2 and 4-bit non-indexed images. * Improvements to XMP handling should result in less warnings. * Fixed issue with some very old CFF fonts failing to parse. * Fixed "Font has bad Flags" message from Acrobat for some TrueTypes. * A change back in 2.6.6 meant when cloning pages in a certain way, fonts and images that were used on multiple pages were cloned multiple times, resulting in bigger file sizes. Now fixed. * Added a PDFViewport.runAction() method, and run the Open Action on a PDF if one is specified when viewing. * Added PDFParser.setFont() method, to override font substitution rules when rendering PDFs. * A bug in PDFCanvas.pathArc (undiscovered since version 1.0!) meant arcs could only be drawn clockwise. Fixed. * Corrected annotation size/positions when the annotation box doesn't match the page rectangle. * Corrected display of translucent annotations in the viewer. * Some PDF/A related fixes to bring closer into line with Acrobat 8. * Fixed opening documents with passwords, broken in 2.7 * In the last release we always use the default RenderingHints when rendering a TIFF. Unfortunately for some reason on Linux/Sun JDK 1.5, anti-aliasing is explicitly set to "off". Changed this back to "default". * Fixed rendering of L*a*b colors * Fixed a few more exceptions and rendering errors resulting from unusually constructed documents. 2.7.6 (released 2006-12-13) ------------------------------- * Added workaround for Acrobat bug regarding character widths for new StandardFont characters added in 2.7.3 * Improvements to reading PDFs mean a reduction in memory footprint and a speed increase of up to around 25% for large documents. * Added support for verifying signatures created with Acrobat 8.0 and by the OpenLimit Signature handler (www.openlimit.com) * Added the OutputProfile.Feature "PDFVersion17" for Acrobat 8.0 documents, and fixed some of the missing Features that should have been returned from PDF.getBasicOutputProfile. * Added PDF.setOption and PDF.getOption, which replace the (now deprecated) setViewerPreference, setLayout and getViewerPreference methods. These new methods also allow the setting of the new Acrobat 8.0 print preferences, although this is considered experimental until the PDF specification is published. * Fixed bug in PDFCanvas(PDFPage) when the page isn't anchored at (0,0) * Added AcrobatSignatureHandlerFactory.setContentSize() method, to specify how much space to preallocate for a digital signature token. * Fixed text extraction from PDFs containing symbolic fonts with differences array (as created by GhostScript) * Fixed barcodes so there is no minimum height. This was attempted back in 2.4.1 but wasn't working for all barcodes. * More robust parsing of embedded OpenType fonts, to handle some invalid PDFs * Fixed display of PDFs that were created by the API (rather than read in) which contain rewritten fonts. * Added new OutputProfile Features Cyan/Magenta/Yellow/BlackSeparation. * Workaround for invalid PDFs created by old versions of Extensis FontSense * Fixed bug introduced two versions ago where a ClassCastException is possible when PDFs containing compressed object streams are re-rendered. 2.7.5 (released 2006-11-09) ------------------------------- * Fixed "Font has bad Flags" issue with certain fonts introduced in 2.7.4 * Fixed "Not in XRef" error when reading/writing some documents, introduced in 2.7.4 2.7.4 (released 2006-10-27) ------------------------------- * Added support for signing and verifying Certifying or "Author" Signatures, via the FormSignature.get/setCertificationType methods. * Redesign of the PDF reading process shaves about 10% off time taken and memory used for large documents. * Fixed missing signature appearances, which disappeared in release 2.7.2 * Improvements to Gradient fills - results are more accurate and Colorspace is preserved (this also applies to Pattern fills) * Improved handling of documents with missing named actions. * Unverified Signatures no longer display two "?" symbols in Acrobat 7. * No longer fails when rendering embedded OpenType fonts with no "post" table. * Fixed bug when printing a page before the first color has been set 2.7.3 (released 2006-10-12) ------------------------------- * Font encodings have been completely reworked - a large change. As a result, rendering PDFs containing "unusual" characters or encodings is much improved. * Added some missing glyphs to the StandardFont class, which can now support all of ISO-8859-1, ISO-8859-2, ISO-8859-9 and ISO-8859-15. * Chinese/Japanese/Korean PDFs using non UCS2 or UTF16 encodings are supported. * Better font substitutions for non-embedded fonts on Windows, OS X and Linux. * Fixed bug where if the last revision in a PDF was less than 1024 bytes long it was being skipped. * Increased maximum object number to 24 bit, to match new limit in Acrobat 6. * Correctly render bitmap images with a colormask. * Fixed bug causing some Type 3 fonts not to render. * Fixed bug in Type 2 parser causing some glyphs to render incorrectly. * Fixed occasional bug when underlining text, added in last release. * Fixed incorrect rotation when page was rotated 180. * Fixed yet more inline images that were failing to parse * Now handles negative values for fontsize when rendering. 2.7.2 (released 2006-09-13) ------------------------------- * Added PDFCanvas(width, height, opacity) constructor to create translucent canvases * Fixed TIFF clipping path problems in european Locales * Fixed FormSignature.getSignatureDate() returning null, broken in last release * Fixes to alpha handling when rendering - wasn't working all of the time. * More improvements to XFA support, including full handling of Barcode fields * Fixed infinite loop in LayoutBox under very specific circumstances * Setting Combs in a FormText turns off scrolling, as expected by Acrobat. * Fixed parsing of some AFM files, which was failing * Better rendering of calibrated colors - we believe this is finally correct * Corrected char widths for Type 0 fonts (mainly chinese/japanese/korean) * Fixed bug where changing color halfway through an underlined paragraph was taking effect too early * Better substitution of missing fonts when rendering * Large regression test found and fixed the following rendering bugs: Fixed infinite loop in RunLength decoding under certain circumstances Typo in CalRGB colorspace resulted in blue becoming green Correctly display CCITT encoded images when EndOfBlock=true writeAsTIFF was failing if CreationDate or ModDate were invalid Pages with invalid annotation lists were failing to render Fonts with Differences Array and ToUnicode entry were rendering incorrectly Color reproduction for DeviceCMYK and DeviceGray colorspaces matches Acrobat Fixed troublesome inline images, broken a few releases ago Graceful failure when JPEG2000 decoder fails from internal errors Fixed bug when nesting clipping areas Fixed Java 1.4 dependency when loading documents with a language specified 2.7.1 (released 2006-08-11) ------------------------------- * Released the source to the rest of the "org.faceless.pdf2.viewer" package, and moved the PDFTool.java example into the JAR as the main class. "java -jar bfopdf.jar --help" for option. * Added the annotateComponent() method to PDFViewport which allow updates to be made to the viewport after the page has been updated. This can be used for anything from adding text highlights or graphics objects to form fields. * Added the AcrobatSignatureHandler factory, which extends HANDLER_ACROBATSIX and allows more options to be set such as changing the hash algorithm and... * Added support for Digital Signature Timestamps (RFC3161). This is supported in Acrobat 7, and by us with the new AcrobatSignatureHandlerFactory class. The DSE200SignatureHandler class should no longer be used unless you're specifically targeting Acrobat 6.0 or earlier with the DSE plugin. * Added the RemoteSignatureHandlerFactory (and RemoteSigningServlet) to allow a PDF to be signed remotely via a simple web-service. * Writing CCITT TIFF images has almost doubled in speed in some cases, provided a ColorModel from PDFParser.getBlackAndWhiteColorModel is used instead of PDFParser.BLACKANDWHITE. * Fixes to PDF/A-1b OutputProfile to work with Acrobat 7.07 (which has had it's PDF/A support updated). * More fixes to the XFA parsing. * Correctly handles Type 6 cmaps in OpenType fonts. * Fixed PublicKeyEncryption, broken in last release. * Fixed the co-ordinates used in the PageExtractor classes so they're relative to the MediaBox - previously they were (incorrectly) relative to the CropBox. * Added OutputProfile.Feature.Article and Feature.PublicKeyEncryption. * Fixed parsing issues occurring on some PDFs with compressed XRef tables, on PDFs with dangling pointers in the page list or with a bad FormChoice object. 2.7 (released 2006-07-18) ------------------------------- * API DIFFERENCE: There was some "confusion by design" over PDF version numbers when verifying signatures. Previous versions treated the original file as revision 0, which made it impossible to determine whether a signature covered the original release or no releases. The API has now been modified so that the original version of a file is revision 1, the first revision is 2 and so on. This should only affect you if you're trying to specifically load an earlier revision of a PDF. If you're validating signatures, provided you're only testing FormSignature.getNumberOfRevisionsCovered()==PDF.getNumberOfRevisions then no changes have to be made. You can now also be sure when the number of revisions covered in a FormSignature is 0, then it's invalid. * Relased the source to most of the PDFViewer package under the "src" folder. We hope this will make life easier for those building their own viewers. * Added PageExtractor.getMatchingText method to help those trying to search a document and highlight the search terms. * Added PageExtractor.Text.getOffset() method, to determine the exact position on the page of a section of text, and getPage(), to return which page the text was on. Fixed getAngle() method too - results were rotated 180 degrees. * XFA parsing is much smarter - the Form.setXFADatasets method should work for some of the more unusual constructions that are possible. * Now supports rendering bitmap images with an alpha channel * Now renders PDF1.6 documents containing OpenType fonts * FormSignature.verifyCertificates was throwing an exception on certain certificate chains, rather than passing back the invalid certificate. Fixed. * Fixed incorrect application of BBox on nested Form XObjects * Improvements made to annotations (particularly AnnotationNote) when setOpacity is called - structure is now more compatible with Acrobat 7. All AnnotationNote types are now anchored to the top-left corner of their rectangle, not just "Note" types. * AnnotationLinks with old-style links to named actions are now supported * AnnotationMarkup had some incorrect flags set resulting in odd behaviour when the document was zoomed. Now fixed. * PDFPattern can have "null" as a background color, for transparent patterns. * Added the PDFTool example - a swiss-army knife for PDFs 2.6.11 (released 2006-06-13) ------------------------------- * Fixed speed increase in last release so it's actually faster in all circumstances. * Now uses LZW compression for non-bilevel TIFF images. This is roughly the same speed as the previous RLE compression algorithm but produces files 50% smaller than packbits (the LZW patent has now expired internationally). * Fixed values returned from PageExtractor.Image.getDPIX/DPIY * Fixed rare problem parsing unusual Type 1 and Type 3 fonts * Fixed underlined text fields losing their underlining. * Fixed rare "PDF IS NULL" error when rendering some PDFs 2.6.10 (released 2006-05-11) ------------------------------- * Fixed obscure problem when creating canvases from a page containing flattened form fields. * Corrected flags for some StandardCJKFonts, which was causing incorrect font substitution in Acrobat. * Down appearance on buttons wasn't preserved if the button wasn't beveled. * Slight improvements to memory and speed when rendering PDF to a bitmap. * Removed some unnecessary work done to each page when reading and writing documents, resulting in a PDF that is slightly closer to the original file structure. Necessary for a particularly obscure bug with a sample PDF. * Fixed opening of 128-bit encrypted documents using the owner password * Fix to XFA field bug introduced in 2.6.9 which sometimes resulted in field content disappearing in Acrobat 2.6.9 (released 2006-04-24) ------------------------------- * Now works with the Bouncy Castle Crypto provider as the preferred provider. * Fixed ClassCastException when rendering, sometimes occuring in PDFs with multiple appearances per button. * Added option to save TIFF images at 204x196DPI, required for TIFF-F. * Rendering PDFs as color TIFFs now uses Packbits compression. * Fixed position of rotated images on buttons. 2.6.8 (released 2006-03-28) ------------------------------- * Roughly doubled the speed of PDFParser.writeAsTIFF() method. * Fixed writing of previously read in PDFs with compressed XRef tables. * Added PDFParser.getBlackAndWhiteColorModel() method, for better control of black/white threshold when creating 1-bit TIFF images. 2.6.7 (released 2006-03-21) ------------------------------- * Added support for PDF/A-1b:2005 as an OutputProfile. * Fixed bitmap images appearing stretched in some cases. * Now parses PDFs with exactly 1k of junk at the end of the file. * Better font substition in viewer. * Can now display text in Multiple Master fonts. * Better handling of File actions. * Fixed position of images extracted from PageParser. * Correctly prints documents with no initial color set. * Attempts to fail gracefully when displaying some corrupt TrueTypes. 2.6.6 (released 2006-01-31) ------------------------------- * Added ability to extract XFA data from a Form, and set a form's values based on an XFA dataset object. * Rendering PDFs containing bitmap images to sRGB is now slightly faster. * Text extraction from PDFs containing bitmap images is considerably faster. * Fixed occasional creation of invalid PDFs where fill and line transparency were both being used. * Correctly use ToUnicode map for single-byte fonts when specified. * Fixed sometime incorrect line width calculation when Track Kerning was used. * Fixed display of 2 and 4 bit bitmap images. * Fixed colors being inverted in DeviceN colorspaces * Added workaround for bug in Sun builds of Java causing rendering of GrayScale images to RGB canvases to take much longer than it should. * Fixed bug in PostScript Function calculator, showing in some GradientFills * Fixed incorrect PDFPage.UNITS_PERCENT calculations. * Process some more corrupt PDFs successfully 2.6.5 (released 2005-12-14) ------------------------------- * Profiled and improved the DiskCache class to reduce memory. Heap use can be reduced by up to 75% in some extreme situations (documents consisting entirely of bitmap images, for example). * Worked around "blue tint" when displaying some PDF documents in the viewer, caused by ColorSpace issues. * Tweaked FormChoice internals to match Acrobats behaviour, rather than the PDF specification. * Tweaks to AnnotationNote class to allow setting of popup window location * Fixed viewer to handle documents containing zero-width lines and other path oddities. * Added display of Type 3 fonts to viewer. * Fixed permissions in PublicKeyEncryptionHandler, and added get methods to retrieve them. * More improvements to text extraction. * Added protected methods getStreamValue / putStreamValue to SignatureHandler. * Added PDFStyle.getTextAlign * Fixed PDFAction.getRemoteFilename 2.6.4 (released 2005-11-22) ------------------------------- * Fixed errors when loading some TIFFs and FDF files, added in previous release. * Added various new methods to PDFAction to support "remote" go-to actions. * Fixed bugs when creating new documents with translucent colors - these were not always working as expected. * Correctly handle truncated images. * Various fixes to handle more bad or unusual PDFs, including those with truncated images/ASCIIHex streams, missing form objects and so on. * Fixes to AnnotationNote rectangles * Handles documents containing TrueType fonts with 1/0 CMaps and no PostScript names 2.6.3 (released 2005-11-04) ------------------------------- * Added setTextValue and getTextValue to WidgetAnnotation, to better handle Checkbox and Radio Buttons in XFA forms. Plus some related XFA bugfixes. * Drastic reductions in size of PostScript generated when printing under some circumstances, due to fonts being rendered as fonts rather than shapes where possible. Currently only for non-embedded fonts due to bugs in java printing. * Added RenderingHints to PDFParser.writeAsTIFF and PagePainter classes, to control rendering settings. * Worked around obscure problem to do with ColorSpace gamuts which could result in color changes when converting PDFs containing CMYK images to CMYK TIFF (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6349627). * Now recognises and uses clip paths in TIFF images, if specified. * Indexed non-RGB images in PDFs are no longer converted to sRGB but are kept in their original colorspace. * Fixed text extraction after the Collection of Text objects has been modified * Fixed widths of non-embedded CID fonts. 2.6.2 (released 2005-10-25) ------------------------------- * Added text and image extraction, via the PageExtractor class. This requires the "Extended Edition plus Viewer" license. * Added integration with Apache Lucene, via the PDFParser.getLuceneDocument() method. * Now parses XMP metadata and keeps it in sync with the original metadata (as set by PDF.setInfo). Also updated PDF.setInfo() and getInfo() to be able to manipulate XMP data as well as the original. * Added "UnscaledPrinting" as an option to PDF.setViewerPreferences(). * Can now display 2, 4, and 16 bit images in the viewer (16-bit images are downscaled to 8) * Handle Indexed images with truncated index map. * Correct fontwidths for Type 3 fonts and unembedded CID fonts in forms * Some fixes to the OutputProfiles, including PDF/X-1a:2001. * Handle some previously corrupt PDFs * Bug fixes to large dictionary changes made in last release. 2.6.1 (released 2005-10-12) ------------------------------- * Added preflighting. OutputProfiles have been vastly expanded and can be extracted from a PDF with the PDF.getFullOutputProfile() method. They can also be applied to existing PDFs to bring them into line with a profile. * PDF/X support completely redone and verified against the ISO specifications and Acrobat. The previous, badly broken PDF/X support has been removed and replaced with OutputProfiles for PDF/X-1a:2001, PDF/X-1a:2003, PDF/X-3:2002 and PDF/X-3:2003. OutputIntents can be specified or extracted from a PDF. * Added the PDF.getBasicOutputProfile() method, which retrieves a lot of "under the hood" information about the PDF. * Added support for Acrobat 6.x document compression. Setting the OutputProfile to OutputProfile.Acrobat6Compatible will cause the document to be fully compressed - the resulting document will usually be considerably smaller, but no longer be readable in Acrobat 5.x or earlier. Also upgraded the PDFReader to parse documents compressed in this way. * Fixed PKCS#7 problem causing some valid Digital Signatures to appear invalid. * Fixed obscure problem with text encodings - using a non-standard encoding with incorrect glyph names for the StandardFonts could cause text extraction and display to lose the spaces in the text. * In the viewer, Fixed text display when page is transformed under Java 1.3. * Fixed NPE in java.awt.geom.Area when trying to print some PDFs containing images to a PostScript StreamPrintService. * Fixed NPE when parsing OpenType fonts with no cmap. * Reset clip rectangle before painting annotations in PagePainter - some weren't appearing. * PDF1.6 no longer has the limits on Dictionary sizes that applied to earlier versions, and our implementation was very inefficient for dictionaries containing 1000s of keys. Now fixed, resulting in potentially huge (10x) speed increases reading some 1.6 PDFs. * Fixed issue in LayoutBox.split() where the split point occurred on a blank line. Was causing some bad breaks in the Report Generator. * Fixed issue getting co-ordinates of annotations on rotated pages before the page had been normalised. * Fixed length of text calculation when a backup font it used. * Printing PDFs created with the trial version now results in smaller print jobs. * Using a predictor on LZW or Flate streams was broken for some parameters. * Fixed Event.CLOSE for documents - PDF specification was incorrect. 2.6 (released 2005-09-26) ------------------------------- * API DIFFERENCE: The AnnotationFile class previously handled all the details of the embedded file. With the addition of the EmbeddedFile class in this release, most of the functionality in AnnotationFile has been stripped out and moved to that class. * Added the PDF.getEmbeddedFile method, to get or set embedded files in the document. Also added the EmbeddedFile class to support this functionality. * Big improvements to DeviceGray, CalGray and DeviceCMYK ColorSpaces - PDFs containing those ColorSpaces now render considerably better. * Unparseable ICC profiles now fall back to their Alternate ColorSpace. * CMYK DCT (JPEG) images embedded in PDFs can now be displayed, although this requires Java 1.4. Earlier versions of Java will continue to fail when decoding CMYK images encoded with a DCTDecode Filter. * Now handles ImageMask images. * The viewer now displays a gray rectangle for images that cannot be displayed, for any reason, to illustrate somethine is there. * Fixed bug when working with rotated pages containing radio button annotations - was resulting in ClassCastException. * Fixed JavaScript actions - can now create actions using UTF-8 characters (reading existing UTF-8 actions was already working, only writing was broken) * Added (or rather made public) the getTextWidths() method in PDFStyle. * Improvements to "Dump.java" example, to better handle PDFs with non-ASCII content 2.5.2 (released 2005-09-14) ------------------------------- * Added RGBA and CMYK as available colormodels for PDFParser.writeTIFF(). Also added PagePainter.setBackground(), to enable PDFs to be rendered to backgrounds other than opaque white. * Fixed viewer component on UNIX, not working due to API differences with Windows! * Removed some more Java 1.4 dependencies. The PagePainter class can now run under Java 1.3 on UNIX and Windows, which means converting PDFs to bitmap images (eg TIFF) or drawing to an existing Graphics2D will work under 1.3. However, the "org.faceless.pdf2.viewer" package still requires 1.4. * Fixed some bugs with XFA forms * Fixed creating digital signatures with no annotations and when flattening some forms - broken a couple of versions ago. * Fixed race condition in StandardCJKFont which could cause occasional errors when trying to create the same font from many simultaneous threads. * TIFFs created from PDFs were technically invalid due to tags being stored in the wrong order, although they were accepted by all tested viewers. Fixed. 2.5.1 (released 2005-09-01) ------------------------------- * Fixed PNG de-interlacing routine - was failing for some image dimensions and depths * Fix attempt to modify unmodifiable map with some Type 1 fonts (since 2.4.3) * The core of the library runs with Java 1.3 again, and will run if calls to System.getProperties() have Access Restrictions. This has resulted in a visible change to the API - StandardEncryptionHandler.setAcrobat7Security no longer throws a javax.crypto.NoSuchPaddingException. 2.5 (released 2005-08-23) ------------------------------- * Added PDFParser and PageViewer classes and org.faceless.pdf2.viewer package. These classes make up the viewer extension, which allows rendering PDFs to bitmaps. This is a significant addition so the version number has been bumped to 2.5, despite the fact the rest of the API is compatible with earlier versions. * Added AnnotationFile class, for attaching files as annotations. * Added "setTextSmallCaps" method to PDFStyle class, to style text with small- caps. * Fixed track-kerning when backup fonts are in use. * Fixed positioning issue with rotated widgets on rotated pages 2.4.3 (released 2005-07-25) ------------------------------- * Added PDF417BarCode class, for PDF417 2D bar codes. * Added QRCode class, for QRCode 2D bar codes (including full support for Kanji and mixed-modes). * Added StandardEncryptionHandler.setAcrobat7Level(), to encrypt documents using the AES Encryption method added in Acrobat 7.0. * Setting values in documents containing XFA forms now works. Also enhanced Form.getElement() to search on the "friendly name" of a field, to make working with XFA forms easier. * Correctly position rotated annotations on rotated pages * Fixed infinite loop when document contains recursive bookmarks * Return PasswordException instead of generic IOException when opening a document and supplying an invalid password, to make invalid passwords easier to catch. * Added support for PPM images to PDFImage class * Fixed bug in v1 compatibility API when calling page.drawPage() * Much of the Font code has been reworked to allow text extraction and rendering - coming soon. Users should notice no changes, but we mention it here for completeness 2.4.2 (released 2005-06-09) ------------------------------- * Better handling of extremely long text - if a single word is longer than the available space, it will be wrapped. * Altering opacity of existing annotations now works for all annotation types. * Handle special case where seekStart is followed by another seekStart - was failing. 2.4.1 (released 2005-05-23) ------------------------------- * Expanded support for TIFF-JPEG images - more variants (although not all) can now be loaded, and those containing an embedded JFIF stream can now be embedded directly into the PDF without recompression. * More flexibility when sizing Bar codes - any width/height/bar-ratio may be used, although a BC1 warning will be displayed if the size is outside legal limits * Fixed bug introduced in 2.4 where boxes would sometimes appear around form fields * FormSignature.loadDefaultKeyStore no longer fails when the default JCE Provider has been changed. 2.4 (released 2005-04-27) ------------------------------- * Added support for multiple signatures. Documents that have already been signed can now have further signatures added to them without invalidating the first signatures. As many as required can be added provided the PDF is rendered between them. Although still API compatible with 2.3.7, this is a fairly large change so we've marked it as 2.4 * Added several methods to PDFAnnotation relating to reviewing and replying to comments - specifically getReviews, getReplies, addReview, and the set/getStatus method in AnnotationNote * Re-saving a previously encrypted document now preserves the Owner password * Fixed some unusual cases when cloning pages with widget annotations * Can now read and write forms with Form XObjects as button images * Always reset graphic state before drawing a canvas, including text operators. This fixes some cases where text in canvases was being located incorrectly, or pictures were inheriting the transparency of the previously drawn picture. * Added AnnotationLink.setCorners(), to use the Acrobat 7.0 feature of non- rectangular hyperlinks. * Completely rewrote the Dump.java example, which hopefully will serve as a better guide for those wanting to extract information from PDFs. * Fixed the memory leak in the PDF1.0 wrapper classes. We still don't recommend you use them, but if you must this should make it a little more bearable. 2.3.7 (released 2005-04-13) ------------------------------- * Reversed change in 2.3.5 which should have resulted in smaller XRef tables. In practice, although it appeared to meet the specification it wasn't accepted by Acrobat and resulted in "Repairing corrupt document" warnings on load. * Fixed concurrency problem occuring when using an OpenTypeFont in more than one PDF, which are then rendered simultaneously * Promoted get/setAuthor, get/setComment to PDFAnnotation class from it's subclasses - these apply to all annotations * Added get/setColor and get/setOpacity to PDFAnnotation * Added AnnotationText class, for FreeText annotation * Fixed very obscure bug in LZW decompression for TIFF images, which could occasionally result in "streaks" in images with horizontal differencing. 2.3.6 (released 2005-04-01) ------------------------------- * Added support for interlaced PNG images. * Added AnnotationMarkup class, for highlight/underline etc. annotations * More robust parsing of CCITT-2D encoded images (including TIFF) should handle slightly corrupt images more gracefully * Very slight modification to line spacing in multiline FormText elements, so fields with many lines occupy the same space as in Acrobat. 2.3.5 (released 2005-03-11) ------------------------------- * Fixed memory leak to do with ICC profiles, which are sometimes embedded in images. Unlikely to affect many users, and at a typical 5k per affected PDFImage it's not a big leak, but if you've been seeing leaks then please upgrade. * The Form.flatten() method has been modified to produce smaller PDF files - sometimes considerably smaller. * Added synchronized block around ICC profile extraction, to work around Sun JRE bug 4863795. Performance hit should be negligable we hope, but if you notice a difference then vote for the bug at bugs.sun.com. * Fixed IllegalStateException caused when flushing an empty page then immediately trying to write to it. * No longer delete unrecognised Annotation types * Fixed issue decoding some LZW streams * Names containing [ and ] characters now work 2.3.4 (released 2005-02-21) ------------------------------- * Fixed signature verification where a document was both signed AND encrypted. The spec is silent on what to do in this case and each handler does it differently, so added the SignatureHandler.isVariableEncrypted method to cover all possibilities. * Added full support for Lab and calibrated Gray and RGB color spaces. * Fixed bug introduced in 2.3.3 where documents were encrypted with metadata unencrypted but all rights enabled, were not being encrypted. 2.3.3 (released 2005-02-07) ------------------------------- * Fixed very rare writing of corrupt strings in documents when encrypted. This could occasionally result in documents failing with "Dictionary key not a Name") when reading them back in with this library. * Fix "trying to seal with mutable objects" error when loading PDFs error once and for all. * Don't encrypt PDFs if no encryption is required * Correctly handle form fields with non-ASCII field names 2.3.2 (released 2004-12-06) ------------------------------- * Fixed rare problem when reading documents containing indirect references to Name objects * FormChoice.setValue("") now works if the options in a FormChoice contains the empty string. * No longer fails immediately if the Length field in a stream is wildly wrong. 2.3.1 (released 2004-11-11) ------------------------------- * Fixed two Exceptions when reading in images from existing documents, one to handle invalid null images created by GhostScript, the other to handle a problem with Masked images introduced in 2.2.4. 2.3 (released 2004-10-25) ------------------------------- * API DIFFERENCE: Removed SignatureHandler.isPDFObjectSignature() method and replaced with SignatureHandler.getVariable(). This is unlikely to affect many (any?) people, but it is an API change so we've gone to 2.3 * Added support for OpenType fonts containing PostScript glyphs * Added "DSE200Handler" class for digitally timestamping documents using the nCipher DSE200 * Fixed positioning of PDFCanvas objects created from pages with CropBox set * Fixed getTop/getBottom methods for Courier fonts * Minor TIFF fixes 2.2.6 (released 2004-10-05) ------------------------------- * Added support for Unicode 4.0 chars > U+FFFF. Currently these characters are only defined in some of the StandardCJKFonts. * Support added for UTF16 encoding (new in Acrobat 6.0). This is required to display glyphs added in Acrobat 6, specifically the HKSCS-2001 and JISX0213:2004 character sets. Also upgraded Cmaps to those supplied with Acrobat 5 and 6. * Directly embed some CCITT TIFF images without recompressing them, giving a sizable speed increase. * Added FDF.setIgnoreErrors() method * Added getChange(), getPrint() and getExtract() to StandardEncryptionHandler * Should now be able to extract text from forms in Chinese/Japanese/Korean that don't use a Unicode encoding * Fix ClassCastException when setting OpenAction on newly-read in documents * No longer force keystore provider to Sun when loading Default Keystore * Fix "trying to seal with mutable objects" error when loading images from existing PDFs 2.2.5 (released 2004-08-18) ------------------------------- * Reduced memory footprint, particularly when reading documents using the PDFReader(File) constructors, and when digitally signing documents when a Cache is in use. Reading large documents should also be about 15% faster. * Rewrote DiskCache to write to disk before the stream is closed if necessary, which allows large individual streams to be handled. * Added PublicKeyEncryptionHandler, to read/write documents encrypted with public keys. * Fixed "stream still open" exception when cloning a page that had had fields flattened on it. * FormChoice fields no longer have a "ghost" image. * Fixed error when reading documents containing a "Caret" annotation. 2.2.4 (released 2004-07-30) ------------------------------- * Fixed XMP metadata generation * The FDF class can now parse XFDF files, provided there is a SAX parser available for it to use. * Fixed duplicate annotations when importing open annotations from an FDF * Added isPDFObjectSignature method to SignatureHandler class, for added flexibility when developing signature handlers. * When creating a Canvas from a Page or cloning a Page, images or fonts used on that page are no longer cloned * Fixed obscure problem when cloning documents with empty indirect dictionaries 2.2.3 (released 2004-07-12) ------------------------------- * Fixed PDFPage.rotate method to work after a call to setUnits * FormTexts are no longer clipped if there is no background/border set - the same behaviour as Acrobat 6. * Page sizes may now be specified as a string like "A4", "A3" and so on. In addition page sizes can now be specified as decimals, eg "100.5x100.5" * TIFF parsing refactored, now uses less memory and takes less time. 2.2.2 (released 2004-06-15) ------------------------------- * Added Caching. Images, Sounds, Pages and Canvases that are closed may now optionally be cached to disk to free up RAM. See the Cache interface. * Repackaged the JAR so that the compatibility classes for version 1 of the library are stored in a separate JAR. * Rewrote the StandardFont class to use less memory and initialize quicker * Text in Forms is no longer displayed with ligatures * Annotations are now imported from FDF documents in the PDF.importFDF method * Added the PDFCanvas.setAcrobat6Layer method, to add watermarks/backgrounds to documents. 2.2.1 (released 2004-05-25) ------------------------------- * A mistake in the testing procedure for 2.2 meant that release is unable to write encrypted documents. All users who downloaded 2.2 are encouraged to upgrade to 2.2.1 as soon as possible. * Added TEXTALIGN_JUSTIFY_ALL to justify all lines of the paragraph, including the last one. 2.2 (released 2004-05-18) ------------------------------- * API DIFFERENCE: Added flush() methods to PDFPage and PDFCanvas classes. These methods *may* need to be called when a PDFPage or PDFCanvas is being cloned. See the API documentation for those methods for more information. If memory is a concern it's a good idea to call them anyway. * API DIFFERENCE: PDFSound.getStream() method returns an InputStream, not a byte array as before. * Major refactoring of the code should help to reduce the memory footprint, mainly in the following areas: * Reading stripped TIFF images * Appending to pages from documents loaded from a PDFReader The changes in this version are mainly to lay the way for a disk-based cache in a future release. * Added new PDFImage constructor, for creating images from raw bitmap data. Useful for extremely large images (we tested with a CMYK 15000x25000 pixel image) or for images in unusual formats. * Added "rawWrite" method to PDFPage and PDFCanvas, which allows advanced users to write raw PDF operations to the page. * Fixed text indent and layout of right-to-left text in Acrobat 6 * Fixed close() method on PDFImage objects and added a close() method to PDFSound Those running low on memory should remember to close() any of these objects that they create. 2.1.2 (released 2004-04-27) ------------------------------- * Added _ModDate and _CreationDate to PDF.getInfo() output. * Added PDF.getDocumentID() method * UNIX users not running X11 should be able to create a PDFImage from a BufferedImage * Fixed CCITT encoding of images where the left pixel of each row is black. 2.1.1 (released 2004-04-08) ------------------------------- * Fixed HeiSeiKaku-Gothic font * Added support for TIFF alpha transparency * For users running Java 1.4, added support for JPEG TIFFs, and also fixed color problem when printing CMYK JPEGs created with Adobe Photoshop * Added support for the JPEG 2000 image format * Fixed exception when using an embedded 2-byte font in form fields. * Appending to pages where the page co-ordinate system was changed now works. 2.1 (released 2004-03-12) ------------------------------- * Added the "MaxiCode" class, to render UPS MaxiCodes (a type of 2-D barcode). We had to change the method signature of the drawBarCode() methods to accept the new BarCodes, so ANY CODE CREATING AND DRAWING BARCODES WILL NEED TO BE RECOMPILED (NOT changed, just recompiled). This is the only reason this release is marked as 2.1 rather than 2.0.9 * Tiled TIFF images can now be loaded, and inverted 8-bit images are working again (broken in 2.0.1) * Fixed rare stack overflow condition when drawing arcs very close to 90 degrees * Fixed equally rare concurrency error when filling out several forms in different threads * Now reads (even rarer) zero-length hex strings when reading PDFs and FDFs. 2.0.8 (released 2004-02-10) ------------------------------- * Signature appearances are no longer opaque by default. * PKCS7SignatureHandler.sign() method is no longer final. * Handles some cases of form names with a "." that weren't handled before. * Obscure problem fixed in 2.0.7 caused some documents to inflate in size drastically - now fixed. * Tweak to positioning for right-aligned form fields prevents occasional clipping * Fixed italic/bold variants of StandardCJKFonts * Added set/getUniqueID() to PDFAnnotation class * Certain documents were incorrectly returning a null action for their bookmarks - now fixed. 2.0.7 (released 2004-01-19) ------------------------------- * Fixed inabilty to reset the dash pattern in a PDFStyle * Drawing dashed lines with a fill-color set no longer gives a "trace" line * Added PDFPage.setBox and PDFPage.getBox methods. * Handles pre-rotated pages with annotations correctly, and no-longer resets the Crop/Bleed/Art/TrimBox when it does. * Now handles fonts created with the "Private Character Editor" supplied with Windows XP * Fixed extremely obscure problem occurring when signing one particular PDF with a non-standard signature appearance. * Fixed slightly innacurate (<0.1%) definition of MM and CM. 2.0.6 (released 2004-01-09) ------------------------------- * Fixed unembedded OpenType fonts - now working again * Added support for PGM and PBM images to PDFImage class * Added 3 new barcodes - PostNet (for US ZIP codes), the RoyalMail 4-state Customer Code (for UK postcodes) and the Deutschen Post Leit and Identcode variation of Interleaved 2/5 (for German postal codes) * Certain types of PDF1.1 named action were causing problems - now fixed * Fixed issue where standard edition licenses failed when annotations are used 2.0.5 (released 2004-01-05) ------------------------------- * Fixed small memory leak when creating Form() object. 2.0.4 (released 2003-12-05) ------------------------------- * Fixed bezier curves when the page origin is set to ORIGIN_PAGETOP * Added workaround for spec-defying behaviour of some FormText elements in Acrobat 5.0 * Added language coding for multi-language documents, for basic accessibility support. Also added RTL markings for hebrew/arabic. * Normalize presentation-forms when creating ToUnicode table. * More FDF tweaks - now handles Checkboxes with values of "Off" * Fixed problem appending to pages that are uncompressed to start with. 2.0.3 (released 2003-11-25) ------------------------------- * Added PDFStyle.setTextStretch() method * Fixed more FDF problems * Improved reading of linearized PDFs with broken byte offsets * Fixed some issues with Track Kerning. 2.0.2 (released 2003-11-19) ------------------------------- * Fixed problem with importing FDFs * Fixed problem where a "double image" can appear when editing a form field in Acrobat that has been created by the PDF library. * Can now read documents with corrupt named actions 2.0.1 (released 2003-11-11) ------------------------------- * Worked around yet another IBM JIT compiler bug - this time, the JDK supplied with WebSphere 5.1 on Windows was failing when reading some documents. * Added support for Acrobat 6 encryption with unencrypted metadata. See the StandardEncryptionHandler.setAcrobat6Level() method * Changes to stream compression result in significant memory savings when creating large documents from scratch - in the region of 5-15% depending on the document. * Fixed auto-sizing of multi-line text box fields * Fixed incorrect RD3 warning when loading an FDF file * Colors for barcodes, form borders and others that were previously black in the RGB colorspace are now black in the GrayScale/CMYK colorspace, for compatibility with PDF/X. Also added CMYKColorSpace.BLACK and CMYKColorSpace.WHITE as constants. * Fixed occasional ArrayIndexOutOfBoundsException in IdentitySet/IdentityMap, caused by some JREs using negative hashCodes. 2.0 (released 2003-11-03) ------------------------------- * First release of 2.0. For a list of changes over the beta period and compared to version 1.0, please see the file "UPGRADING-2.0.html" 1.2.11 (released 2003-06-25) ------------------------------- * Fixed processing of indexed 2-color java.awt.Image images. * Fixed bug whereby Signatures in Acrobat 6.0 were not visible. 1.2.10 (released 2003-04-30) ------------------------------- * LayoutBox now has a new constructor which specifies the Locale of the box as a whole. This is only required if the main locale of your LayoutBox has a right-to-left language like arabic or hebrew. * By popular request, added an "addTab" method to the LayoutBox class for easy creation of tab stops. * Changing the value of form fields with multiple annotations changes the value for all annotations. * Fixed FormRadioButton.setValue() method for new radio buttons * Form Signature actions such as "Mark as ReadOnly on all fields" now work 1.2.9 (released 2003-04-08) ------------------------------- * Submitting an entire PDF as a form action now works. * Add fix for broken colorspace, occurring very rarely under Solaris 2.8 * Fixed mistaken assumption that CropBox/MediaBox is a direct object 1.2.8 (released 2003-03-21) ------------------------------- * "-32768" error reading extremely large, complex documents has been fixed. * Now handles TrueType fonts that have their name specified in UCS-16 only * Correctly reads font widths for all types of Type 1 fonts in form fields * Added workaround for broken colorspaces on AS/400 JDKs for Spot colors * Added fix for occasional broken printing with Acrobat 4.0 1.2.7 (released 2003-02-24) ------------------------------- * Fixed issues with track kerning - the return value from getTextLength was incorrect. * Now recognizes TIFF images with alpha channels that aren't explicitly marked as having an alpha channel. 1.2.6 (released 2003-02-12) ------------------------------- * Fixed PDF.getJavaScript method - wasn't working properly at all. * Better support for drawing zero-length strings, which were failing under some circumstances. Also fixed Exception when calling LayoutBox.flush() twice in a row. * Now handles documents with shared resource dictionary, like those created by JetForm 2.3 * No longer converts NULL form text fields to empty form text fields. * Fixed multi-threading issue during font initialization. 1.2.5 (released 2003-01-24) ------------------------------- * Added workaround for documents whose streams begin with "stream<0D>" only * Added fix for PDFDocEncoding - "\r" wasn't listed. This was resulting in newlines being stripped from JavaScript and some annotations. * Fix for TIFF images with ASCII directory entries <4 bytes long 1.2.4 (released 2002-12-23) ------------------------------- * Fixed checksum calculation for Interleaved 2/5 barcodes * Added workaround for JIT bug in IBM Java 1.3.0 and 1.3.1 on Windows, as supplied with (at least) WebSphere 4.0.2 to 4.0.4. This was causing a NullPointerException when reading PDFs * Fixed PDF.getBookmarks() - will no longer return NULL if the document doesn't have any * Handles buggy CCITT Group 4 TIFF images with premature EOL markers. * Acrobat 4.0 has a limit of about 4k for JavaScript in a single item. Now splits document-wide JavaScript into smaller lumps to work around this * JavaScript may now contain Unicode characters. * Handles buggy PDF documents where a named action points to something other than a page * Fix for obscure bug where the last revision of a multi-version PDF was ignored if it was less than 1024 bytes long * Fix rather stupid error which was causing the pdf.getInfo() method to fail on any documents which were explicitly marked as trapped/not trapped * Fixed error in Type 1 fonts which was causing warning messages under JDK1.4 1.2.3 (released 2002-10-31) ------------------------------- * Fixed handling for rotated form elements, which was broken in version 1.2 * The drawText() method now handles leading newlines and lines consisting entirely of spaces in the same way as 1.1.x * Fixed alpha values of non-sRGB fill colors, broken in 1.2.1. 1.2.2 (released 2002-10-21) ------------------------------- * Closes the file and frees resources when a PDFReader is created with a java.io.File. This probably would have resulted in memory leaks for those calling this constructor * Fixed the PDFAction.getJavaScript method * In certain situations the last word of a LayoutBox wasn't getting positioned correctly - this is now fixed 1.2.1 (released 2002-10-01) ------------------------------- * IMPORTANT CHANGE FOR DIGITAL SIGNATURES. Owing to an oversight in earlier releases of the library, it was possible for a document modified after a digital signature had been applied to show up as valid. Although the signed section of the document was unchanged, it is posible to "append" a later revision of the PDF to the file, and this would not show up as invalidating the signature. Those using the library to verify digital signatures should upgrade, and see the documentation for the "FormSignature" class to see what changes are required to their code. * Tied in with the above change is the new ability to import earlier revisions of a PDF, by means of a new PDF constructor and the PDFReader.getNumberOfRevisions method. * The beginText/drawText/endText method of printing text should now function almost identically to version 1.1 of the library (the only differences are bugs that were fixed) * Added the ability to import a Forms Data Format (FDF) file to complete a form - see the PDF.importFDF method and the new FDF class * Added the ability to load an FDF-format keystore, of the kind exported by Acrobat 5, to verify Adobe self-sign signatures. See the FormSignature.loadFDFKeyStore method. * Increased the range of characters available in the MSung font to include the HKSCS 2001 characters added to the Adobe CNS1 revision 3. This seems to be a combination of the characters from the ISO10646:2-2001 when they're in the BMP, and characters in the U+E000 to U+F848 range when they're not. Note the MHei font does not appear to contain these characters in Acrobat 5 - users requiring these characters should stick with MSung * Fixed a bug in the LayoutBox class, which was causing text to be pushed down too far. Text is now displayed according to the CSS rules, i.e. any leading is split equally in two on either side of the text. * Fixed handling of PDFStyle.setTextIndent * Added several new methods to LayoutBox - splitAt() (to split a box in two), getLineNumber(), getLineTop(), getLineBottom() and setText() * Fixed displayed values in FormChoice * Form Buttons can now be read-only, and new fields are printable by default. * Added isMultilineScrollable/setMultinelineScrollable flags to FormText * Fixed mouseover/mouseout when reading form elements 1.2 (released 2002-09-03) ------------------------------- * Fixed some problems with creating new forms using TrueType fonts. * Fixed an encoding problem with Forms. Now forms using the standard fonts should work for all languages covered by Adobes "PDFDocEncoding". * Fixed some final layout bugs to do with kerning. Results are now identical to 1.1.x versions of the library, except where those results were incorrect. 1.2 BETA2 (released 2002-08-28) ------------------------------- * Fixed bug in beta 1 - failing to read some forms * Fixed the TIFF parser to prevent it choking on malformed custom tags. * Fixed bug with reading CFF fonts from forms that use the Adobe Standard Encoding. * Fixed bug in setAccessLevel which always allowed annotations to be altered * Added "getGoToCoordinates" method to PDFAction class 1.2 BETA1 (released 2002-08-20) ------------------------------- API CHANGES ----------- * Now reads DPI from JPEG images. This may result in some JPEG images being resized as previously they were always assumed to be 72dpi (this is the chief reason this release is 1.2 rather than 1.1.28). We've added the getDPIX() and getDPIY() methods to the PDFImage class, to make conversion easier - to reproduce the old behaviour, change any reference to "image.getHeight()", to "image.getHeight() * image.getDPIY() / 72" * the setFillColor() / getFillColor() methods in the PDFStyle class now take a java.awt.Paint object, rather than the more limited subclass java.awt.Color. This won't require any changes to code unless you're using the getFillColor() method, but will require the code to be recompiled to avoid a NoSuchMethodError at runtime. * The ColorPattern class is now an implementation of Paint, rather than a subclass of Color. In addition, the contract for the adjustBrightness method has changed to adjust and return a copy of the pattern, rather than the current pattern. OTHER CHANGES ------------- * Completely rewrote the text layout engine around the "LayoutBox" class, and backported the current API to fit. This should allow existing programs to continue on as before, while those requiring more advanced layout can use the new classes. * Added the concept of a "backup font", where a style can define one, two or more fonts which act as a backup to the main font if a glyph isn't found. See the PDFStyle.addBackupFont() method. * Corrected use of Unicode characters in Bookmarks and Annotations - now working properly. * When merging pages from two PDFs into one, now correctly handles pages with form fields. * Added the ability to fill with a java.awt.GradientPaint. * Form Text and Button fields now work properly when rotated about 90, 180 and 270 degrees. Form Text now works for centered multiline text. * Handles buggy documents where the AcroForm array points to the annotations, not the widgets * CCITT TIFF image reading about 40% faster, on average. * Added BARCODEUPCA, for UPC-A barcodes that don't look like EAN-13 * Now handles Unicode spacing character U+2000 to U+200A in the StandardFont class * PDF reading now skips junk at the start/end of the document, and can read buggy documents where actual and recorded stream length don't match. Also removed some debug code, which should speed things up a bit. * TrueType fonts requiring more than 255 glyphs are now embedded properly. Also added a warning when using a TrueType font that is missing some (but not all) PostScript names, which was causing blank spaces in the document. * PDFs can now be rendered more than once - this was broken a few releases ago. * Merges resources across multiple form fields, for smaller documents 1.1.27 (released 2002-06-26) ---------------------------- * TrueType names required for unembedded fonts are different to TrueType names required for form fonts! Fixed so the appropriate name is chosen. * Now reads interlaced GIF images, and GIF's with comments too. * Fixed bug in FormSignature class when "SUN" is not the default provider. * Correctly handles CMYK JPEG images saved by Photoshop, which were inverted * Fixed some problems with the arabic ligature routines - U+0651 to U+0655 weren't being classed as non-spacing. * Fixed obscure problem when recoding fonts that differ from the Adobe Glyphlist, which could sometimes result in the wrong glyph being displayed. 1.1.26 (released 2002-05-16) ---------------------------- * Added fix to previous CompactFont change, was breaking documents with unembedded Type1 fonts * More workarounds for bad forms - reads MK from stream and DA/DR from annotation if necessary. * Workaround for segmented content-streams with no space between operators * Added zero arg contructors for FormElements * Fixed some bugs with Form Signatures - default name is now set according to API docs 1.1.25 (released 2002-05-12) ---------------------------- * Added workaround for forms that erroneously specify an FT for their annotations * Added Chinese/Japanese/Korean fonts for form elements. We'd appreciate feedback on this, as it's difficult to test without a localized copy of Acrobat. * Further, hopefully final fix for for pages with unusual MediaBoxes - now works when pasting these onto other pages. * Preliminary work on Compact Font Format - form elements using this font type can now be rewritten, but new CFF fonts cannot (yet) be loaded. 1.1.24 (released 2002-05-08) ---------------------------- * Fixed problem with last change to TrueType fonts - was breaking documents using large subsets of those characters (eg. the Unicode.java example) 1.1.23 (released 2002-05-07) ---------------------------- * Fully implemented AcroForms! Text boxes, buttons, javascript etc. - a very large addition for users of the Extended Edition. See the userguide, the new Form???.java examples, and the Form??? classes in the API documents for details. * New action - FormJavaScript, FormSubmit, FormReset, ShowElement, HideElement and FormImportData - plus new helper methods to deal with these. * New annotation type - rubber stamp. * New annotation methods - set/getPage, set/getEventAction, set/isVisible, set/isPrintable, getLastModified * New method for fonts - isMonospace(). Ligatures are now disabled for Monospace fonts. * New page method - removeAnnotation * New examples - FormCreation, FormFill and FormProcess * Code128 Barcodes may now include newlines (\n), representing the FCN1 control character. This allows EAN128 codes to be printed * Pages with CropBox set now have their size returned correctly * Fixed bug in number formatting which occasionally caused bad PDFs * Fixed problem where reusing a subset TrueType font gave missing glyphs * Fixed bug with form fields and fonts containing punctuation characters in their names. * Remove deprecated PDFPage.resetClip() method 1.1.22 (released 2002-04-21) ---------------------------- * Optimized - squeezed another 8-10% speed increase for writing PDFs. * Hopefully fixed problem with reading PDFImageSets from slow pipes. * Renamed bouncycastle package to bouncycastle1, to avoid method resolution clash with new versions of their package. * Fixed occasional problem with ASCII85Decode filter * Added some new methods to PDFAnnotation and PDFAction, in anticipation of upcoming Form support. * Now correctly handles all "seascape" pages. 1.1.21 (released 2002-04-12) ---------------------------- * Corrected the size of the LETTER_LANDSCAPE pagesize * Added setTextIndent method to PDFStyle object, to control the indenting of the first line of text in a paragraph. * Text height is now calculated correctly when the line-spacing is set to values less than the height of the font. * Fixed some problems with Track Kerning - length wasn't being accurately calculated. 1.1.20 (released 2002-04-07) ---------------------------- * Fixed bug resulting in illegal PDF stream when importing certain PDF documents. * Certain Type 1 fonts were failing due to blank lines in the Kerning Pair data. Now fixed. * Now handles TIFF images missing SamplesPerPixel and BitsPerComponent tags. 1.1.19 (released 2002-03-22) ---------------------------- * GIF images of any depth can now be read. * Changed obfuscation method. Should now be able to use the library in fussy environments like Jikes and Visual Age for Java. 1.1.18 (released 2002-03-02) ---------------------------- * Fixed some bugs in the ASCII85Decode filter, which was failing on some docs. Also added ASCIIHexDecode and RunLengthDecode handling, for completeness. 1.1.17 (released 2002-02-22) ---------------------------- * Now handles transparency in GIF and PNG images. Note this is not full alpha transparency - colors can only be fully transparent or fully opaque. * Compresses 1-bit images using CCITT-G4 compression - up to 40% smaller. * Fixed an image handling bug introduced in the last release which was breaking some TIFF images. * Fixed unusual problem to do with different page sizes in documents created with early version of Distiller. * Fixed problem when transferring annotations and bookmarks between documents - if they referred to a named destination, the name wasn't transferred. * Fixed problem with editing pages that have been rotated - any alterations to the page weren't being rotated to match. * More robust reading of PDFs in general 1.1.16 (released 2002-02-13) ---------------------------- * More, more and still more CCITT fixes. * 1-bit PNG images were colliding with a bug in Acrobat Viewer. We now decompress and recompress them, which slows things down slightly when dealing with these images, but opens the way to recompression with CCITT (coming soon). * Now extracts DPI from PNG image if specified using the pHYs chunk. * Slight improvement in memory efficiency. First of many we expect. * Fixed problem reading some older (PDF1.1) PDFs with named destinations. 1.1.15 (released 2002-02-05) ---------------------------- * Added fix for CCITT TIFF images wider than 1792 pixels, some of which were failing. * Added fix for some LZW streams which were failing. 1.1.14 (released 2002-01-27) ---------------------------- * Optimized. Most applications should now run between 30% and 50% faster. * Reduced memory footprint by StandardFont class - the main memory hog. * Added two new barcode algorithms - EAN-13 (also covers UPC-A) and CodaBar. * Added setTrackKerning method to PDFStyle class, to override or force kerning for text. * Updated the userguide to cover the changes since 1.1.12. Digitally signed it, because we can. 1.1.13 (released 2002-01-21) ---------------------------- * Added native TIFF image support. Although this doesn't cover every TIFF format, it does cover uncompressed, RLE, LZW, CCITT RLE and Group 3/4 (both 1D and 2D). Not supported are JPEG, ThunderScan and NeXT images. Also added the wrapper class PDFImageSet to handle Multi-page images efficiently. * Added Digital Signatures via the "FormSignature" class (available with the extended version only). Currently handles Adobes Self-Sign signatures and VeriSigns document signer plugin. * Added the "Sign.java" example to demonstrate these signatures. * Added new drawBarCode() routine to the PDFPage object, giving even more control over the code (allows the height of the code and the thin/thick ratio to be specified) * Fixed bug where setting the clipping path as the first thing on the page resulted in an invalid PDF. 1.1.12 (released 2001-12-09) ---------------------------- * Added support for Reading and editing an existing PDF. This is done using the PDF(PDFReader) constructor. Added several new examples demonstrating this functionality - Stamp, PageStitch, FormFill and Dump - and updated the userguide to reflect this. * The trial version now has the word "DEMO" stamped on each PDF instead of the 30-day timeout. * Added support for Adobes XMP specification, allowing XML metadata to be embedded and extracted from the document. The methods "setMetaData" and "getMetaData" have been added to the PDF, PDFPage, PDFImage and PDFSound classes. See http://www.adobe.com/products/xmp for more information. * Added 128 bit encryption, as supported by PDF1.4 (Acrobat 5). This is set using the PDF.setEncryptionAlgorithm method. * Added "drawPage" method to PDFPage class, for merging several pages into one. * Added "getPages" to PDF class, to get the list of all the pages in the document. * For PDFPage class, added "seekStart" and "seekEnd" methods to control where to make changes to the page - before or after any current page content. * Added a corresponding "get" method for many set methods in many classes - specifically added: * "getInfo", "getViewerPreference", "getNamedActions" and "getOpenAction" to PDF class * "getType" and "getPage" and "getSound" to PDFAction class * "getType", "setTextAnnotationContents", "getTextAnnotationContents", "setTextAnnotationLabel", "getTextAnnotationLabel" and "getRectangle" to PDFAnnotation class * "getOpenAction", "getCloseAction" and "getAnnotations" to PDFPage class * "getSample", "getRate" and "getType" to PDFSound class * Added timezone to creation/modification dates * Fixed Unicode support for bookmarks, annotations and document information * Fixed the Named Actions handling in the PDF so it works properly. * Fixed a minor glitch in the PDFBookmark class which didn't appear to affect anything. 1.1.11 (released 2001-11-29) ---------------------------- * Another IBM specific bug - worked around the AS/400 throwing an exception when calling java.awt.color.ColorSpace.getInstance(CS_GRAY). Also optimized for the 99.99% of cases where the colorspace is sRGB, which may avoid problems on other colorspace-impaired platforms - almost certainly including AIX. Do all IBM JRE's need a graphics card to work with colorspaces? 1.1.10 (released 2001-11-21) ---------------------------- * Finally isolated and added a workaround for a JIT bug in the IBM JRE. Users using IBM Websphere or other IBM versions of Java for Windows who have got an "ArrayIndexOutOfBoundsException" when using non-Latin characters, this fix is for you. * Fixed bug where bookmarks that were supposed to open by default, weren't * Added the "pathClipAndPaint" method to PDFPage 1.1.9 (released 2001-11-13) --------------------------- * Fixed bug in StandardCJKFont where some characters codes were rendered incorrectly. 1.1.8 (released 2001-11-09) --------------------------- * Deprecated the PDFPage.resetClip method, as it violates the PDF spec. The correct way to reset the clipping area is to nest calls to clip between save() and restore(). 1.1.7 (released 2001-11-07) --------------------------- * The upside-down arc fix in 1.1.5 broke Rounded rectangles for certain canvas orientations (including the default). Fixed this. 1.1.6 (released 2001-10-25) --------------------------- * According to the PDF specification, nesting calls to path operations while a text paragraph is open is illegal (although it does actually work under Acrobat 4 and 5, it causes an error in some versions of Acrobat 5). Consequently the draw, path and clip methods (e.g. drawRectangle) will now throw an IllegalStateException if called between a call to beginText and endText. THIS MAY BREAK EXISTING APPLICATIONS. The workaround is to ensure the only method called between beginText and endText is the drawText method. 1.1.5 (released 2001-10-23) --------------------------- * Many, many color changes. Most important, generated PDF documents are now automatically calibrated to use the sRGB colorspace, the same colorspace used in Java. Documents may appear slightly different, but they're now more correct than they were. * Added setNamedAction() method to PDF object. * Added clip...() methods to PDFPage objects, to set the clipping area. * Added (transparent) support for device-independent color. ICC profiles are now extracted from colors or images and embedded in the document where appropriate. All of this occurs behind the scenes, but means that an image or color which is supposed to be device-independent, will be. Handles calibrated RGB, CMYK, Gray, full ICC profile embedding and Spot colors, leaving only Lab and DeviceN color spaces unsupported. * Added support for device-dependent CMYK color via the CMYKColorSpace class * Added support for Spot (separation) colors via the SpotColorSpace class * Deprecated the drawBarCode method and added a new one allowing more control over the size of the barcode. * Fixed bug where only the last hyperlink on a single line of text returned the correct list from endTextLink. Very obscure, unlikely to have affected anyone but us. * Fixed interesting problem where ColorPatterns were only sometimes being applied. When comparing a class and a subclass, equals isn't necessarily symmetric! * Fixed problem where arcs came out upside-down if the setCanvas method had inverted the page co-ordinates * Change setLineDash so parameters can be floats (for very short dashes) 1.1.4 (released 2001-10-03) --------------------------- * Fixed all new inconsistancies (aka bugs) in the state stack - the save() and restore() methods - that we introduced in version 1.1.1. This was breaking things that rely heavily on these methods, including our Graph library. 1.1.3 (released 2001-09-27) --------------------------- * Nailed the last (yes, we're confident) of the problems caused by codepages different to our test environment, in particular several Eastern European Windows locales. Write once, run anywhere huh? 1.1.2 (released 2001-09-21) --------------------------- * Fixed a problem with certain TrueType fonts (usually smaller ones) embedding incorrectly, resulting in missing characters when subset. * The "font may have restrictions on embedding" test for TrueType fonts was reversed, so only fonts with no embedding restrictions displayed this message. * Added the setOpenFullScreen method to the PDF class. 1.1.1 (released 2001-09-18) --------------------------- * Fixed a problem with certain TrueType fonts failing - noticable with Arial Italic from Windows 2000. * Fixed some inconsistancies in the page stack - restore was restoring aspects of the style that had never been saved. Also clarified in the save() method JavaDocs *exactly* what is saved and what isn't. 1.1 (released 2001-09-14) ------------------------- API CHANGES ----------- * Whether the font is rendered as a solid or outline no longer depends on the LineColor or FillColor being set to null, but on the new setFontStyle method of a PDFStyle. REASON FOR CHANGE: This restriction meant the colors often had to be set to null, for no reason other than to prevent text being drawn with an outline. Following the rule of "always optimise for the most common case", and considering how rarely outlines text is actually used, this didn't make sense. Plus it made underlining text very difficult. IMPACT: For programs using outlined text, add a call to setFontStyle for the outlined texts' PDFStyle. * The return values from drawText, continueText, endText and discardText are no longer an integer representing the number of text lines used, but a double representing the number of points needed to render these lines. So for example, a call to drawText with a single line of text with a leading of 14 would return 14.0, rather than 1. REASON FOR CHANGE: Required to handle multiple font sizes per line. Think superscript/subscripts. IMPACT: Most programs ignore these return values anyway. Only programs measuring how many lines a paragraph took to render will need to change. * The Line spacing variables have been altered. Previously, the default spacing was based on the actual height of the font, and defaulted to 1.2. This meant for double spacing the spacing had to be set to 2.4, which was just plain strange. The spacing is now a function of the inter-baseline distance of each individual font, so double spacing requires a value of 2. REASON FOR CHANGE: Previous system didn't allow fonts to set their own leading. IMPACT: Because the line spacing is now font-dependent, programs that adjust the line-spacing may need to tweak the values slightly to fit. If in doubt, try dividing all values passed to PDFStyle.setLineSpacing by 1.2 NEW FEATURES ------------- * Increased text layout speed - documents making heavy use of text are over 40% faster. Now renders the first 20 chapters of Great Expectations in 8 seconds flat on our test machine! * Documents can be encrypted using a 40-bit cipher algorithm compatible with Acrobat 3.x and later, using the PDF.setUserPassword() method and friends. * Embedded TrueType fonts are now subset by default, resulting in potentially huge savings in filesize. * Chinese, Japanese and Korean text is supported (horizontal writing only) using the StandardCJKFont class. Correct display depends on having the appropriate language pack installed. * Text layout now uses the full Bi-directional algorithm from the Unicode 3.1 specification, and the Line Break algorithm from the same, resulting in correct text layout in most languages (although line breaking for Thai, Khmer, Laotian and Burmese is not implemented). Correctly handles direction override characters U+202A to U+202E. * Recognises Unicode characters U+00A0 (non-breaking space), U+00AD (soft hyphen), U+200B to U+2011, U+2028 - U+202E, U+2044 (Fraction slash), U+2028 - U+202E and U+FEFF (zero-width non-breaking space), which can be used to control line and word-breaking as per the Unicode 3.1 specification. In particular, U+00AD characters can be sprinkled throughout text to indicate an acceptable word-break, but won't be visible unless a break actually occurs. * Hooks added for word-hyphenation, and a "last-resort" algorithm implemented for english (will only come into play when the word is too wide for a whole column, in which case you want to look at using soft hyphens anyway). * Accessing more than 255 distinct characters in a single font is now handled internally by the library. Unlike earlier versions, you can now just create the font and then use as many characters as you like. * Added pattern fills using the ColorPattern class. Currently only pre-defined patterns can be used. * Can embed sounds with the PDFSound object. * Added new Actions - goToURL, playSound, and named. Actions can now be linked together in a list to perform more complex actions. * Added setOpenAction and setCloseAction methods to PDFPage, to allow actions to be run when the page is opened or closed. * Added getPageNumber method to PDFPage, and getNumberOfPages to PDF classes. * Added Annotations. The PDFAnnotation object allows embedding of popup notes, sound, files and hypertext links. The latter can be added manually, or via... * Added beginTextLink and endTextLink methods to PDFPage, for actions positioned within a paragraph of text. A piece of text in a paragraph can now easily be made a hyperlink to (for example) a webpage, another part of the document, they can play a sound or print the document. * Added the drawEllipseArc and pathEllipseArc methods to PDFPage, for drawing arcs, and the drawCircle and drawCircleArc methods to PDFPage for circles. * Added the drawRoundedRectangle method to PDFPage for drawing rounded rectangles or (for the designers out there) "supercircles". * Added underlining and strikeout for fonts, via the new setTextUnderline and setTextStrikout methods in the PDFStyle class. * Added superscript and subscript capabilities to PDFStyle by calling the PDFStyle.superscriptClone() and PDFStyle.subscriptClone() methods. * Added the getAscender, getDescender, getUnderlinePosition, getUnderlineThickness, getStrikeoutPosition and getStrikeoutThickness to the PDFFont superclass and it's children. * Bookmarks can now be coloured and italicised if the PDF viewer supports it (currently Acrobat 5.0 only) * Hebrew and Yiddish combining characters are now used if available. * PDF.setOpenAction can now take a null value to remove the action. * Styles can now have some fields (specifically font and color) set to null even if they are required, to inherit from a previously applied style. BUG FIXES --------- * Fix added for broken TrueType fonts which specify a width for zero-width characters (diacritics). This is surprisingly common! * Fixed a couple of bugs when the continueText method is used to contine text to the same page (for example, in a different column). If the continued box is not contiguous with the previous textbox, leading blank lines are now trimmed automatically. * Fixed problem with non-embedded TrueType fonts getting an incorrect italic angle, ascender and descender value. * Fixed problem with zero-length image files throwing an exception other than IOException. * Kerning wasn't working on Type1 fonts (it is now). 1.0.4 (released 2001-07-23) --------------------------- * A new PDFBookmark() constructor was added, to allow creation of bookmarks that are open by default. * Fixed bug in Locales using a "," as a decimal separator causing invalid PDFs to be created. * The internal state of all PDF Objects has been reworked, mainly to fix a memory leak, but it has the side effect that objects like fonts and images can be created once and then reused in different PDFs without side-effects. Should make threaded PDF generation more consistent too. * New example showing PDF generation from servlets - HelloServletWorld.java * Fields in a dictionary are now ordered alphabetically. This has no effect for viewers, but is great when comparing two PDFs using diff(1). * Actions are now dictionaries. This means a few more bytes for each bookmark in the document, but is necessary for future work on annotations (hyperlinks, popup-notes, sounds and movies etc.) 1.0.3 (released 2001-07-10) --------------------------- * Changed license key algorithm. Old keys are still backwards compatible, but all license keys supplied from this date forward will need at least this version of the library to run. * Fixed minor bug where paragraphs ending in a single word are followed by a newline. 1.0.2 (released 2001-07-01) --------------------------- * Fixed bug in PDFPage.discardText() that caused an invalid PDF to be created * PDFStyle.getLineCap and PDFStyle.getLineJoin now return an "int" instead of a "float". This matches the corresponding set methods. * Optimized the use of styles within the page. This should give slightly smaller PDFs than before and (for documents making heavy use of styles), result in a large speed increase: one of our tests more than doubled in speed. * Now silently drops null values from dictionaries, resulting in slightly smaller files. * Type 1 fonts weren't being compressed in previous versions - they are now. 1.0.1 (released 2001-06-26) --------------------------- * Fixed a big problem with binary files under Windows (yes, the good ol' CR/LF trap). Windows users should definately upgrade. * Fixed bug get PDFImage.getHeight() actually returning the width. * New method - PDFPage.discardText() * New example - HelloUnicodeWorld.java * New documentation - CHANGELOG and unicode.txt * Created new classes TextProcessor and friends for dealing with complex text processing (as will surely be demanded by Unicode spec). * Added support for minimal set of Arabic ligatures from Unicode spec. Some of the code for this is based on some example code by Roman Czyborra (http://czyborra.com) * Reverses a line of text if any HEBREW or ARABIC codeblock characters. Correctly handles Arabic digits (ie. they're still written L2R). * More accurate font-metrics for built in fonts - now uses the full glyph bounding box to determine size, not just ascender/descender. * Fixed problem with center or right aligning multiple lines of text (text was being centered on the left of the paragraph block, not the center). 1.0 (released 2001-06-09) ------------------------- * Initial release