What's new in Big Faceless Java PDF Viewer 2.28.4

Mar 8, 2024
  • Added the final PDF/UA-2 OutputProfile, and two OutputProfiles for
  •   "Well Tagged PDF"
  • Added the "HtmlDerivation" class, to deriving HTML from a tagged PDF.
  • The StructureTree Document will now put newlines in extracted text to indicate line breaks, and text content will reflect the "ActualText" property if its set on any content.
  • Previous release broke TIFF output for regular RGB images - now fixed.
  • Minor adjustments to PDF/UA-2 profile requirements based on interop testing.
  • Fixes for indexed colorspaces when using a custom OutputProfile.ColorAction to convert colors.
  • Add AcrobatSignatureHandlerFactory.setSSLSocketFactory to control how SSL connections for OCSP responses, Timestamps, Certificate and other signature-related content are made.
  • Fixed, for the final time, the ability to force the PDF version number when saving the file by requiring or denying a PDFVersionNN feature on the profile.
  • Ensure we never write a NameTree with a mix of UCS and non-UCS encoded keys, and that we sort them the same was as Acrobat (ISO32000 errata #214)
  • Under some rare circumstances, the original OpenType Color fonts (which we turn into Type3 fonts) were embedded in the PDF, despite not being used. This would increase the file-size and could cause some validators to complain.
  • Bookmark open counts were not being set properly under some workflows
  • Fixes to kashida justification algorithm
  • Updated Arlington model to latest release
  • Viewer: fix longstanding issue where a viewer that has no ThumbnailPanel would not display PDFs opened via the Open menu item.
  • Viewer: ensure "defaultMode" property can be set to "DragScroll" or "TextTool" to choose the initial cursor selection mode.

New in Big Faceless Java PDF Viewer 2.28.3 (Dec 7, 2023)

  • "Print Preview" images can now be created with PagePainter. See the blog
  • article for more information on this significant addition to the API
  • The CMYKColorSpace profile for device-dependent CMYK is now based on FOGRA39.
  • This means a slight colorshift from previous releases when converting CMYK
  • content to RGB (the old profile can still be used, see API docs)
  • Added the DocumentPart class, for PDF 2.0 "DPart" support
  • Added output profiles and profile features to support Factur-X 1.0.6
  • Added support for Australian Post 4-state barcode
  • DeviceNColorSpace has new getNames() and getColorConvertOp() methods. The
  • DeviceNColorSpace.Builder has some new methods to make building easier.
  • Only complain about "Nested BMC/EMC" sequences (invalid in PDF/UA) if both
  • the parent and child are actually reachable from the Structure Tree.
  • Fixed adding new properties to the StructureTree class-map, and when verifying
  • PDF/UA-2, ensure we check the class-map for properties if necessary.
  • Added support for TIFF images that use Flate compression with a predictor
  • Previous version set PDF version to 2.0 whenever PAdES signatures were used,
  • as that's when they were officially defined. This broke various tools that
  • (unwisely) depended on a PDF version 1.x, and PAdES had been in common use for
  • years prior to that anyway. Fixed this so it will work properly with PDF/A.
  • Fixed renaming spot colors in single-color images with a ColorAction
  • Fix creating a canvas from a page that had to be repaired due to it using a
  • Tiling pattern - this was causing a "Canvas not closed" exception since 2.24.4
  • OCSP responses with no certificates no longer cause an exception
  • Fixed issue where cloning a PDF while it was being verified in another thread
  • made impossible things happen.
  • Previous release broke setting a "Layout:BBox" attribute to a raw float array.
  • Added setRule() method to OutputProfiler SimpleImageAction, for resampling
  • Ensure we always write "L" key for inline-images
  • Corrected creation of PDFImage from Image using an IndexColorModel of < 8bpp
  • Fixed use of Decode array with Images in Lab colorspace (exceedingly rare)
  • Rendering PDFs with irregular tiling patterns is quite a bit faster
  • Viewer: Line annotations were being drawn in the wrong direction

New in Big Faceless Java PDF Viewer 2.28.2 (May 24, 2023)

  • Updates to several output profiles (mainly PDF/A-4 and PDF/UA-1) to fix some bugs and align our results with other tools. The PDF/UA-2 profile is now largely complete and matching the final draft of the specification.
  • Many small bugs fixed and improvements made to the Structure Tree, as a result of the work on PDF/UA-2.
  • Added "roles" parameter to the Structure Tree, to try and tame the complexity of element role-mapping. See PDF.getStructureTree API docs for details.
  • Updated Arlington model trunk as of 2023-05-24.
  • Fix for Type1 fonts that make presumptions about the hstem values returned from the PostScript internaldict subr #3.
  • Fixes to JPEG error recovery to match other tools.
  • Fix rendering error when font-size is zero
  • Fall back to generic fonts when rasterizing PDF if the OS supplied font is missing glyphs.
  • Viewer: Added SearchPanel.setMerged() to allow the search panel to group all matching text on a page into one item.

New in Big Faceless Java PDF Viewer 2.28.1 (Mar 20, 2023)

  • Previous release broke applying Signatures with Timestamps. Now fixed.
  • Previous release broke conversion to PDF/A of PDFs that had been cloned
  • before conversion, where the original PDF was missing XMP metadata.
  • Previous release introduced a check for timezone-less dates in XMP, but the
  • repair for this was failing on cases where the date was also invalid.
  • Fixed PDF/A conversion for PDFs containing fonts that share a FontDescriptor.
  • Cloning a PDF before PDF/A conversion could cause conversion failures for
  • documents containing OPI data, associated files, or a particular variation
  • of damaged action.

New in Big Faceless Java PDF Viewer 2.28 (Mar 10, 2023)

  • SECURITY: XMP parsing did not disable external entity resolution, so a
  • malicious PDF could requested XML data is downloaded when processed.
  • Details have been emailed to affected customers and are available on request
  • INCOMPATIBLE CHANGE: the PKCS7SignatureHandler.SigningEngine has two new methods to implement, getOCSPSResponses() and getCRLs().
  • Added the SignaturePolicy class to try and manage changes over time to the
  • digital signature validation policy used in the BFO PDF Library.
  • Added support for GlobalSign's new Qualified Signing Service, and added a
  • setCustomAppearance() method to set custom visuals for them.
  • FormSignature.verify() can no longer deadlock while running simultaneously
  • to OutputProfiler.apply(). Progress in verify() can now be controlled with
  • thw new FormSignature.cancelVerify() FormSignature.isVerifying() methods.
  • When digitally signing we sometimes need to guess at the size of the
  • signature, and would do that by signing twice, first with dummy data. This
  • is problematic when the Signing process is expensive or slow (eg a signing
  • service). We now calculate the size the signature would be.
  • A list of preloaded OCSP responses and CRLs can now be supplied to
  • AcrobatSignatureHandlerFactory/PKCS7SignatureHandler.addValidationInformation to avoid the need to download them from the network when they're required.
  • Our previous build fixed the version numbers being set in the PDF, but this
  • caused a few other tools that (unwisely) rely on version numbers to break.
  • Now the version number can be forced by setting that feature to required, eg
  • pdf.getBasicOutputProfile().setRequired(OutputProfile.Feature.PDFVersion14)
  • Rewrote the float formatter we use internally to improve precision of least
  • significant figures when writing numbers to a PDF, while still running 16x
  • faster than DecimalFormat.
  • LayoutBox.setWordBreaksAllowed() wasn't working as described if the line had
  • already overflowed the width of the box. Now fixed, but for anyone relying on
  • the old behaviour, setting the "org.faceless.pdf2.LayoutBoxBreaksOnOverflow"
  • system property to not-null will revert this change.
  • Remove some cases where a PDF repair was done before it was needed,
  • potentially invalidating a signature.
  • Fixed error (introduced two versions ago) where using a SpotColorSpace in a
  • PDFCanvas *before* it's been added to a PDF threw an Exception.
  • Repurposed the deprecated OutputProfile.Feature.PurgeResources to allow it
  • to remove unreferenced resources from within a page.
  • Added the OutputProfiler.RemoveSignatures strategy to remove, rather than
  • flatten, signatures when the OutputProfiler.apply method requires it.
  • Some minor adjustments to the PDF/UA-1 profile to more closely follow the
  • letter of the specification.
  • Some minor tweaks to the API to make offline signing simpler.
  • Optimizations to getArlingtonModelIssues() should speed this up by about 25%. Updated model to latest version.
  • Fixed error introduced in 2.27 where certain types of damaged form fields
  • were recovered with the incorrect name
  • Fixed a a particular type of repair to damaged Name Trees that was deleting
  • nodes instead of reordering them.
  • Previous release introduced an exception if a PDF contained an invalid
  • extension; now fixed.
  • Viewer: if a signature is removed from the PDF, make sure this is reflected
  • in the signature dialog. Also removed some unnecessarily noisy event handling
  • designed to reset a signature state to unknown when the PDF has changed.
  • Viewer: some fixes to FullScreen mode to keep the UI intact when the PDF
  • in a DocumentPanel is removed or changed.
  • Viewer: when closing the PDF in single-window mode, we weren't resetting
  • the dirty flag for the next PDF that was loaded.

New in Big Faceless Java PDF Viewer 2.27.2 (Nov 25, 2022)

  • Digitally signing a PDF will now set the correct version number on the file.
  •   For PAdES signatures, this means the version will be PDF 2.0
  • Integrated the "Arlington" PDF data model as a validation step - see the new
  •   ArlingtonModelIssue interface API docuementation for detail.
  • Add support for PDF Extensions, specifically ISO32001 (which adds the SHA-3
  •   family of signature hashes) and ISO32002 (which adds Edwards Curves Ed25519
  •   and Ed448, both of which were added in Java 15).
  • Fix a bug in our DER encoder - Set keys were not ordered. Technically
  •   this meant some signatures we've been generating are invalid, although in
  •   practice no PDF reader seems to verify this.
  • Fix an issue with 8-bit Lab ICC colorspaces where the colors were incorrect
  •   on conversion to RGB. Discovered in internal testing as these profiles are
  •   never seen in the wild.
  • Fix for "sRGB Appearance profile beta" ICC profile from color.org
  • Several minor changes to ensure PDFs generated by the API match the Arlington
  •   model - essentially verifying all fields in a PDF match the specification.
  • Fix QR-Code encoding for a particular mix of Kanji and number values which
  •   was causing the mode-switch to break, and throw exceptions.
  • Added AnnotationFile.setCustomAppearance(), to support custom visualizations
  •   for file annotations.
  • No longer update or generate ProcSets, which have been obsolete since
  •   2001. Viva progress!
  • Quieten XML parse failures from SAX parser when parsing bad XMP data.
  • Viewer: when PDF is modified, reset the validation state of any signatures.

New in Big Faceless Java PDF Viewer 2.27.1 (Sep 23, 2022)

  • Fixed a bug introduced in the previous release which could cause text to
  • disappear in some workflows - in particular, setting a custom appearance
  • on a signature.
  • Fixed a particular case where the previous "repair on load" still gave
  • incorrect results.
  • Updated our Signature Validity checks to match the current version of Acrobat
  • by exhaustively testing what can and can't be changed in a signed PDF.
  • For documents that have been modified after signing, this may result in the
  • validity of the signatures changing in this release (for context, Acrobat's
  • algorithm has changed since the last time we checked this in 2019, and is both
  • undefined and inconsistent). This release is much closer than previous ones.
  • Block "shadow attacks" on signatures, as illustrated by pdf-insecurity.org
  • Many, many more adjustments to the loading process to try and match Acrobat's
  • behaviour, and to better handle some deliberately corrupted documents from the
  • Safedocs corpora. Several OutOfMemory and one StackOverflow issues fixed.
  • Fixed loading of encryption flags when stored as an unsigned int
  • When creating a PDFImage from a source image with transparency, where possible
  • use a PDF/A-1 friendly "Mask" rather than a "SMask"
  • Added PDFImage.isIndexed() and PDFImage.getTransparency() methods, and fixed
  • PDFImage.quantize() to work correctly with transparency.
  • Properly fixed clipping of unfeasibly large patterns when drawn with
  • transforms onto a page, for all cases.
  • Fix a particular issue where we were not properly merging redefined
  • Separations for PDF/A
  • Identify a "billion laughs" type-error with page resources and fail early.
  • Updated bundled "bfopdf-jj2000.jar" to include latest fix from Github -
  • previous build would throw java.lang.Error on some types of corrupt input
  • which we hadn't previously encountered.

New in Big Faceless Java PDF Viewer 2.27 (Sep 6, 2022)

  • Dropped support for Java 6 - supported versions are now Java 7 to 17.
  • Updated bundled "bfopdf-jj2000.jar" to include latest fix from Github,
  • which could result in failures parsing some images with an alpha channel.
  • Redid the process of repairing form fields on load, to try to match Acrobat's
  • unpublished algorithm. For documents that require extensive repair on load,
  • this may result in differences to the repair process affecting which
  • annotations and fields are repaired.
  • Use thread-safe classes for very high access structures used while
  • profiling. Documents that share fonts over thousands of pages no longer
  • block threads when profiling on multi-core hardware.

New in Big Faceless Java PDF Viewer 2.26.5 (Jul 4, 2022)

  • A "patch level" change indicates a minor feature or bugfix.
  • Methods MAY have been added to the API, but none have been removed.
  • 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.
  • 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.
  • Code written for version 1.1 is unlikely to work under 2.0

New in Big Faceless Java PDF Viewer 2.26.4 (Mar 18, 2022)

  • The "Resource Merge" step which can be used to potentially reduce the size of files assembled from multiple smaller documents was sometimes writing out fonts with a ToUnicode that was incomplete, or failing to identify duplicate glyphs because the originals came from fonts with a different "longloc" flag. Both now fixed.
  • Some very specific workflows could lead to a synchronization lock when reading PDFBookmarks - reworked these classes to make it impossible.
  • Fixed exception rendering a PDF when the XMP object has been explicitly disabled from the output.
  • Added PDFImage.setStrictDPI() to mimic the image DPI extraction rules from HTML5
  • Don't fail when preflighting a PDF containing form fields with no font set.
  • Re-rendering a signed PDF that was missing a trailing newline is fixed.

New in Big Faceless Java PDF Viewer 2.26.3 (Feb 16, 2022)

  • Added PDFPage.createGraphics() and PDFCanvas.createGraphics(), to return a java.awt.Graphics2D object that can be used to write to the page or canvas. See PDFCanvas.createGraphics for details on this.
  • Fixed regression in 2.26 relating to image scaling; when on a workflow that runs two passes over the page (namely, printing), a transform applied to bitmap images was applied twice - only noticable with anamorphic scaling. Symptoms often included a blank or damaged page when printing.
  • Added XMP.setValidating() method to allow unknown XMP properties to be set without failing (known properties must still be of the correct type). This makes things a bit more useful for PDF/A-4, which no longer uses extension schemeas.
  • Fixed silly problem with PDF/A-1 validation - we were ignoring trailing noise in any Info Dictionary dates, causing us to pass some invalid files as valid.
  • Fixed a very specific issue when PDF/A conversion when no substitute fonts are available for a Type1 font inside a Type3 font.
  • The StandardEncryptionHandler was failing to decrypt files if bit 31 was not set as required in the specification.
  • Fixed a complaint about "this page is not in the PDF" when merging files that contains bookmarks and a structure tree.
  • OutputProfiler: added a "getStrategy() method; added new "PartialPages" strategy to render what we can from fatally damaged pages; ensure we only throw ProfileComplianceException when conversion fails; allow rasterized pages to be quantized to 8-bit via setCompressionOptions().
  • XMP.getData() will include the namespace for unknown fields. Added an XMP.addAll() method to merge XMP objects. Added an XMP.repair() for when the repair to an XMP needs to be run manually, is it might be for an image XMP.
  • Fixed obscure threading issue when rendering OpenTypeFonts that are shared across PDFs (which we don't recommend).
  • More fixes for another batch of difficult documents to ensure we handle various types of corruption as nicely as possible.
  • Extraction of XMP metadata from PNG and JP2 images had never worked - fixed.
  • Improvements to the code matching XFA form fields to the Acroform fields.
  • Fixed exception when cloning a PDF then accessing the clones bookmarks.
  • Some fixes to ensure that brand new PDF files are created in a way that is generally compliant with PDF/A (fixes to Type3 fonts, canvas cloning, DeviceNColorSpace)
  • * Made various changes internally to allow projects using the API to be compiled to native code using the GraalVM project. Mostly this was removing any use of Serialization, which was used internally in some places to store state.
  • Viewer: fixed the code for generating self-signed certificates added in the previous release to replace the calls to the internal sun classes.

New in Big Faceless Java PDF Viewer 2.26.2 (Nov 12, 2021)

  • Tested and verified with Java 17, dropped support for Java 5, and removed all support for Applets from viewer package. Note that JavaScript is NOT currently supported under Java 17; this is planned for a future release.
  • Reduced the memory required to load TrueType and (in particular) OpenType fonts, and delayed the instantiation of some of the data we need until the font is used. These changes makes it cheaper to load fonts that may not be used.
  • Added support for UTF-8 ECI mode to QR-Code, which means any UTF-8 character can be encoded. Reader support for this feature is common but not universal; we will only use it if no other encoding option for that character applies.
  • Adjusted the font selection algorithm in Preflight to favour smaller fonts.
  • When preflighting, certain types of damage no longer results in the page being rasterized.
  • When preflighting, reduce memory footprint for fonts that use 16-bit identity lookups for their ToUnicode structures (a regression in 2.26).
  • The method OutputProfile.getICCColorSpaces(), added in 2.26, was promptly broken in the following release and always returned an empty list. Fixed.
  • Fixed exception when justifying a LayoutBox line with only a single character.
  • When merging multiple structured documents, some tree structures could result in first level of the tree being sorted incorrectly. Now fixed.
  • Fixed bug introduced in 2.26 that prevented us creating a PDFCanvas from a PDFPage that had disabled optional content.
  • Added support for WOFF2 collections.
  • Fixed some bugs relating to OpenType color fonts
  • Minor fixes to some XMP namespaces.
  • Worked around an AWT bug on Linux relating to rasterizing PDFs; non-embedded fonts are rendered with a java.awt.Font, and a bug introduced in 11.0.4 (we suspect related to the Harfbuzz upgrade; it's still present in 17.0.1) causes diacritics on the text to be mis-positioned.
  • Viewer: got rid of legacy "AppleSupport" class, replaced with general "DesktopSupport" for integration with the java.awt.desktop package.
  • Theoretically this could apply on platforms other than macOS.
  • Viewer: the KeyStoreSignatureProvider.X509SignatureState class has a method, getCertificate(), which was confusingly named. Deprecated, and added getSigningCertificate() and getUnverifiableCertificate() to remove ambiguity.

New in Big Faceless Java PDF Viewer 2.26.1 (Sep 30, 2021)

  • Fixes for NameTree/NumberTree structures with > 8191 elements; we were not splitting these into smaller sections correctly
  • Vastly improved error logging, in particular during PDFReader stage - warnings are consistent and generally don't include stacktraces where they won't help.
  • Signatures: added support for RSA-PSS, Gost1360/1361, ECDSA signatures in IEEE P1363 format; added several workarounds for non-standard PKCS#7 variations if supported by Acrobat; fixes for unexpected variations of OCSP responses.
  • When preflighting and we have to rasterize, and the resulting image has no color pixels, convert to grayscale.
  • Add OutputProfiler.setRasterizingActionExecutorService, to allow the rasterizing stage of PDF/A conversion to be run in parallel.
  • Ensure OutputProfiler.apply() can be interrupted with OutputProfiler.cancel(), and ensure that we return at least the semblance of something useful from OutputProfiler.getProgress() while apply is running.
  • Fixed handling of XMP values that consist only of space characters, and of lists of invalid values which would cause nulls to get into the datastructure.
  • Fixed issue where Template pages containing form fields were losing their fields. Fixed issue where multiple copies of a Widget in a Field's list was not being repaired properly.
  • Added support for PDFs using non-standard UTF16LE encoding in Text Strings (eg Bookmark labels, Optional Content layer names, annotation text etc).
  • This encoding is not in spec but is supported in Acrobat, and not uncommon.
  • Fixed concurrency issue relating to the retrieval of names from CFF fonts, which could cause features relating to incomplete CharSets to incorrectly be set when profiling a PDF. Seemed to be quite rare in practice.
  • Added rare but required standard CMap "V" and less-rare but non-standard UTF8
  • CMaps to the set included with the PDF API.
  • When choosing an ICC profile for use as a target profile, exclude profiles that are missing the B2A tables: we can't convert colors TO that type of profile
  • We were supposed to be updating the xmpMM:InstanceId and "secondary" trailer document ID to a new random number on each save, but we broke this two releases ago. Now fixed.
  • Many corrections to PDF/A-4 profile, in particular regarding color, actions and the many ways a PDF version number can be invalid. Many new features added. Many more very specific tweaks for various edge cases where our PDFA3 results disagreed with veraPDF and Acrobat.
  • Finished bulletproofing against Apache Tika and GovDocs - 50,000+ files.
  • Many weird edgecases fixed (timezones of UTC+73 hours, pages over 600km on each side, Type3 fonts with negative glyph widths), and quite a few less weird ones too. All files load and parse where possible, or fail with an explanation otherwise.
  • Correct identification of "font missing unicode values" for PDF/UA and PDF/A-na profiles.
  • Fixes in a few workflows (text extraction, preflight) where fontsize=0
  • Corrected rendering when rasterizing a page that contains a tiling pattern that overlaps itself. Result is a bit slower, but appears correct.
  • Where a PDF had thousands of fonts sharing one font file, we created thousand of parsed fonts, which did not end well. Now we create one.
  • Tweaks to the XMP output. Fixed type definition of Iptc4xmpCore:ContactInfo, and reflect that exif:MarkerNote was dropped in 2005 edition of spec
  • Updated the bfopdf-jj2000.jar to qualify an earlier fix which was breaking the loading of JPX streams under some conditions.

New in Big Faceless Java PDF Viewer 2.26 (Jul 31, 2021)

  • The OutputProfiler class has been extensively rewritten to allow conversion from any PDF to PDF/A. As part of this change some incompatible changes were required to parts of the API:
  • the OutputProfiler.ColorAction interface had some methods added (implementers can just return null) and the ProcessColorAction implementation had a method removed (setAllowUncalibrated).
  • the OutputIntent class has been added, and some of the methods working with OutputIntents in the OutputProfile class deprecated (although they still function).
  • See http://bfo.com/blog/tags/preflight for details on this significant change
  • Changed the EmbeddedFile.getSize() method to return a long rather than an int.
  • Considerable performance improvements in a few areas; some operations, eg PDF/A profiling and certificate signature validations, should be quite a bit faster.
  • A lot of "bulletproofing" has been applied to ensure difficult files can be processed, identify loops and over-allocations early, and where we have to, throw sensible exceptions.
  • New methods on EmbeddedFile to manage folders as well as files; to manage modify/creation dates as Calendars (to preserve timezone information); to manage user-specified data; and to help track PDFs embedded in PDFs. Relates to the next item, and to the new "EmbeddedFile" display in the viewer.
  • Added the Portfolio class and the PDF.getPortfolio() method, to manage PDF portfolios (also known as PDFs that are mostly a tree of file attachments).
  • The PDF.getXMP method now always returns a non-null value, as XMP objects now have isValid() and isEmpty() methods, so can be used to represent invalid XMP. PDFCanvas, PDFSound, PDFPage, PDFAnnotation, ICCColorSpace classes now have a getXMP() method to augment the legacy get/setMetaData methods.
  • XMP metadata and EmbeddedFiles can be associated with elements in the StructureTree. New methods in the OutputProfile allow retrieval of XMP (getXMPs()) and EmbeddedFiles (getAssociatedFiles()) from anywhere in the document
  • OutputProfiling was previously checking the XMP metadata on the PDF for compliance; we are now correctly checking all XMP metadata in the file.
  • Made some slight corrections to the PDF/A-1, A-2 and A-3 profiles, in particular to ensure we disallow undefined fields in XMP complex types; we believed this was allowed, but have since confirmed it is not.
  • When creating LTV signatures, we were caching OCSP responses with no explicit expiry time for this for 24 hours. Changed to 5 minutes, to match Acrobat.
  • Removed an unneeded synchronization lock when verifying signatures, to allow this to be done in parallel with most other operations, eg PDF/A validation
  • When signing, check the KeyUsage of the key and reject it if it's going to be rejected by Acrobat. This can be overridden by setting the org.faceless.pdf2.IgnoreKeyUsage property
  • We were accidentally dropping the timezone from the date when we create a DSS signature validation; now fixed.
  • We were not correctly recognising signed digital signatures that have no annotation (the presence of an annotation is an unofficial requirement)
  • Fix potential infinite loop when rendering a PDF with the ResourceMerge feature set, and rendering was running in a single thread.
  • Fixes for OpenType CID fonts where CID!=GID and OpenType GSUB substitutions are used; we were using the wrong lookup.
  • Viewer: the SidePanelFactory.isSidePanelRequired() method has changed signature to take a DocumentPanel rather than a PDF. The original PDF can be retrieved by caling DocumentPanel.getPDF();
  • Viewer: moved most of the constants out into a PropertyFile that is compatible with the FlatLAF property file syntax. This should allow easier customization, including new icon packs, different margins/paddings on buttons etc. See Util.installUIDefaults() method for detail.
  • Viewer: general refresh to some of the UIs, specifically the Signature and Thumbnail side panels.
  • Viewer: Added an EmbeddedFile side panel, and support hyperlinks linking to embedded files.
  • Viewer: Added support for WebSwing, to display the Swing application as a web application. Added RemoteControl, OpenSystem and PrintSystem features to support this.
  • Added ConvertToPDFA example
  • Removed pack200 version of Jar.

New in Big Faceless Java PDF Viewer 2.25.1 (Mar 31, 2021)

  • Fixed rookie error when comparing timezones that may cause newly created PDF/A or PDF/X documents to fail when the local timezone switches to summer time. This one was introduced in 2.24.1, released in December.
  • Correctly generate PDF/A documents with more than 8191 pages.
  • We weren't properly handling rendering for some old Type 1 fonts where the ".notdef" glyph wasn't CID 0. Also added recovery for some even older Type 1s with noise at the end of some of the streams.
  • Better recovery from noise at the end of a page/content stream.
  • Optimizations for Sampled Functions with large numbers of input parameters. While rare, these were extremely slow so had an outsized impact on average performance.
  • Optimizations for common cases when recoloring images during preflight.
  • Fixed bug where OutputProfiler.FontAction may not correctly substitute a font, introduced in 2.24.3
  • Corrected verification of LTV Signature DSS dictionaries when PDF is encrypted.
  • Include OCSP/CRL certificates for the Time Stamp in the DSS dictionary for LTV validation informaton.
  • Don't stack overflow exception when asked to display a form field with 128KB of binary data. Please don't make form fields like this.
  • Fix NPE when linearizing existing PDFs that have a missing (rather than empty) page content stream - this was a regression introduced in the previous release.
  • Viewer: fixed some issues with the Page Number field when switching between two different documents.
  • Viewer: some bulletproofing to handle cases where pages are removed from a PDF and those pages contain form fields.
  • Viewer: bulletproofing for pages containing form fields when switching to full-screen

New in Big Faceless Java PDF Viewer 2.25 (Feb 26, 2021)

  • The PKCS7SignatureHander.SigningEngine interface has a new setPassword() method, required for some types of PKCS#11. This is only an issue if you're implementing this interface, which most won't. But it is a breaking change, and the reason we jumped to 2.25
  • Significant reductions in memory footprint for the entire API, thanks to some fairly nasty low level optimizations of some basic types. To quantify this, profiling shows the amount of memory required to load a 1000 page document with many annotations has dropped by about 20%.
  • Huge reduction in memory footprint when creating linearized documents, over 90% for some very large testcases. The tradeoff is a minimal increase in runtime, which we've been unable to notice in practice - although this can be disabled by setting the "org.faceless.pdf2.LinearizedSinglePass" property to not-null.
  • Fixes to the linearization structure for "old-style" documents where the first page opened is not page 1. Wider fixes to the same structures for "compressed xref" documents.
  • The sRGB profile we have been embedding in PDFs for many years is not quite accurate. Replaced with the compact, public-domain profile from https://github.com/saucecontrol/Compact-ICC-Profiles. This may result in a
  • Very slight shift in colors for any PDF generated by the API. We were also
  • Using the modified D50 constant from the ICC specification, not the correct
  • CIE constant. Fix has resulted in a barely perceptible shift in brightness when rendering some PDF documents to bitmap images.
  • Officially added PDF/A-4 profiles to OutputProfile class, and tweaked a few features as a result.
  • Fail during render() when creating a PDF/A-1,2 or 3 PDF that has object pointers greater than the maximum integer value in those specs (approx 2GB)
  • Quite a few fixes to XMP
  • Added Value.clone(XMP) method, to deep-copy a value to allow it to be copied from one XMP to another.
  • Added Property.isDefinedIn() method, to show in which version of the XMP standard a property is defined, and Property.isValid() method.
  • Escape only control character during serialization, not all non-ASCII chars.
  • Ensure that all XMP values contain only characters allowed in XML1.1
  • Ensure TimeZone-free dates don't suddenly aquire one when they're migrated.
  • Fixed creation of PDF/A extension schema Type when type is a closed choice
  • Correctly identify empty-dates and lang-free Lang-Alts as type mismatches.
  • Correctly reset OutputProfile features when properties are removed.
  • Identify and repair a particular type of damage to rdf:li.
  • Fixed "clear()" method which wasn't clearing everything.
  • Fix for an unusual combination of encryption settings relating to the long-deprecated 40-bit RC4 algorithm.
  • Fix to sin/cos functions in our optimized PostScript Function parser.
  • Added PDFDrawable.setDefaultColorSpace, to allow Device Gray/RGB/CMYK to be anchored to a calibrated space on a per-page basis.
  • Some very large patterns accidentally fell off the optimized path when rendering, which slowed down rendering considerably. Now fixed.
  • Cloning a PDF after its Structure Tree had been extracted for any reason, didn't always correctly sever the two documents. Now fixed.
  • Minor fixes to OptionalContent layers with exclusions (i.e. "radio-button" groups).
  • Fix for PKCS#11 signatures where the native PKCS#11 library enforces the "relogin before signing" requirement, which we hadn't implemented properly.
  • Fixed bug in WOFF2 parser causing us to miscalculate the glyph box, which sometimes resulted in glyphs being positioned incorrectly on the page.
  • Fixed obscure bug in Type2 (CFF) outline parser that was only visible if the text was being stroked, not filled. Regenerate CFF BBox if the value loaded from the font is invalid, as Acrobat requires it.
  • Extended the number and type of repairs we're able to perform on a StructureTree to bring a document into PDF/UA compliance. Fixes for some edge cases relating to the PDF2.0 "Artifact" element.
  • Fixed generation of MeshGradients in Lab colorspaces.
  • Viewer: added "ignoreDocumentPageMode" option, to ignore the document "page mode" option when opening a PDF.

New in Big Faceless Java PDF Viewer 2.24.4 (Dec 11, 2020)

  • New XMP class to make working with XMP metadata much easier. The XMP metadata we generate now includes DocumentID and InstanceID. Added support for RelaxNG schema use with XMP, as used by PDF/A-4.
  • Lots of small fixes to bring our PDF/UA-1 validation into agreement with the veraPDF corpus. Now completely aligned with their results (except for a few tests with confirmed or under-discussion errors in them).
  • FormSignature has getByteRangeCovered(), to make creation of signatures from an asynchronous signing service (like SwissCom's new service) a bit easier.
  • AcrobatSignatureHandlerFactory has a new "setTimeStampServers" method, to allow more than one TSA server to be used, for failover.
  • New get/putUserData() methods on PDF, PDFPage, PDFAnnotation and EmbeddedFile, to allow storage of your custom properties within a PDF.
  • When a beginTag/endTag sequence is issued and there's no content between them, include an empty content item so that the tags are anchored to that page and will be moved with them.
  • When migrating pages between documents that have tags, we also move any tags that refer to content on the migrated pages. Now, also move empty sibling tags at the same time.
  • Added magic "phoneme" and "phonetic-alphabet" attributes for tags, to store PDF 2.0 pronunciation hints. Added new "lexicons" DOM config option to StructureTree, to store a PLS-format pronunciation dictionary.
  • Fixed specific issue relating to a particular interleave of beginTag/endTag, text and canvas that was causing an NPE. And a similar issue where a particular nesting of tags inside an Artifact would cause an exception.
  • Applying an OutputProfile with a CMYK intent to a PDF with DeviceRGB content where the combination was disallowed, didn't always fail (and vice versa). Now fixed. We also report on this in OutputProfile.isCompatibleWith()
  • Fixed translation of shading/tiling patterns when creating a PDFCanvas from a PDFPage, if the page had a non-zero origin MediaBox or page orientation.
  • Changing the alpha value between text runs didn't flush the text; now fixed.
  • Slight improvement to the position of text in annotations where not enough space is available.
  • Added ITF-14 Barcode Symbology
  • Fixed a bug in the ICCv4.3 "lutAtoBType" table handler, which was causing some of the GWG tests to fail to render.
  • Fixed some poor synchronization in getNamedActions.
  • The position of underlines was out by the width of a line; fixed.
  • Fixed scaling of bitmaps in OpenType CBDT fonts
  • Fixed ToUnicode creation for Type3 fonts.
  • Viewer: ensure we call "documentEnabled" on all actions in features, not just those created by the standard ViewerFeature.setAction() method.

New in Big Faceless Java PDF Viewer 2.24.3 (Jul 13, 2020)

  • Added support for Khmer and Myanmar Unicode blocks, the last two scripts requiring special handling for layout.
  • Optimizations for OpenType-CFF parsing - on large fonts like Noto Serif CJK, speed is almost doubled.
  • Make sure we can handle characters defined in versions of Unicode ahead of
  • The version supported by the JVM. Updated internal model to Unicode 13.0
  • When rendering non-embedded CJK text to a bitmap on Linux, look for the Noto fonts on the OS as an option. Also, don't believe the AWT when it tells us that a glyph is defined in a Font (because, often, it's wrong). This should fix the occasional blank space where some dingbat characters should be.
  • Added support for preflighting and generating PDF/X-4 documents.
  • Added support for setting and getting ISO19593 processing steps to Optional
  • Content layers.
  • Some compatibility issues had got into the code that prevented it from running under Java 5. Now fixed.
  • XMP metadata can be set and retrieved from fonts (it's extracted automatically from WOFF/WOFF2 fonts if present), elements in the StructureNode (if the bfo:metadata property is true, call element.getUserData("metadata") to retrieve), Optional Content layers and ICCColorSpace objects.
  • When manipulating OutputProfiles, don't lose the Output Intent.
  • Added support for extracting Color Separations from the OutputProfile
  • The Reader returned from the various "getMetaData" methods will always return the metadata as a String from toString(), so you can just do pdf.getMetadata().toString() to extract it in one line.
  • Fixed JavaScript support for Java 11/14. We are still using the deprecated Nashorn engine, as that continues to work the Java 14.
  • Some tweaks to PDF/UA validation to align with the expectations set by the
  • Latest version of the reference suite.
  • Some fixes for text extraction from fonts embedded with 0/1 cmaps. When extracting text with no semantic meaning, assign the private-use area
  • Characters based on the CID, not based on the order we encounter them, which was non-deterministic as this is multi-threaded.
  • Some fixes to links-to-structure-destinations, added in last release, and added support for creating links to embedded files.
  • Throw "ProfileComplianceException" (a subclass) rather than plain old
  • IllegalStateException when trying to do something that is disallowed by an
  • OutputProfile. This allows us to add more context to the exception.
  • Allow a "forced" PDF version number to be set when writing the PDF. While
  • This shouldn't be required, ever, there are some workflows that require a specific version number, so this change caters for them.
  • Viewer: when importing a non-PDF file (eg a TIFF) into the viewer, we now
  • Disable the Save button, but initialize the filename to the matching PDF for
  • SaveAs (the Save feature can be re-enabed for new files, see the API docs).
  • Viewer: the SaveAs feature has the option of only allowing the PDF format,
  • And a new "Export" feature can be added to the viewer to save in non-PDF
  • Formats.

New in Big Faceless Java PDF Viewer 2.24.2 (Jun 3, 2020)

  • ToUnicode maps for OpenType fonts have been improved, and should now reflectany OpenType glyph substitutions.
  • The PDF Library now ships with some free OpenType fonts that are identical to
  • the StandardFonts in every metric. These will be substituted by the OutputProfile.AutoEmbeddingFontAction, resulting in visually identical PDF but without the unembedded fonts.
  • Fixed the use of OpenType-CFF fonts in forms.
  • Added a new feature "OverprintOff", which can be set to denied to modify
  • the PDF so it can be safely drawn as a canvas without knocking out any ink
  • behind it.
  • Fixed OutputProfiler.ColorAction rebuilding of Type 1 shading patterns.
  • Added a new feature "DoubleCompression", which will remove a second
  • compression from image streams that have been compressed twice. This could trigger a bug in Acrobat causing the images to turn bright pink ("My Little Pony" documents).
  • Some fixes to the StructureTree to make the structure it generates work a bit
  • better with the NVDA screen reader.
  • Moved around some low-level features used in the OutputProfile to ensure we
  • have one for every combnation of alt-text on link, annot and form StructElems.
  • It's now possible to create a "Tree" of OptionalContent layers, rather than
  • just a list, with the new OptionalContentLayer.getOptionalContentLayers()
  • method.
  • Added the ability to embed video and 3D models to AnnotationRichMedia.
  • PDFAnnotations can now be part of an OptionalContent layer
  • PDFAnnotations can now have Locales and Associated Files (both new in PDF2)
  • Cloning a PDF that uses embedded fonts within form-fields, and then filling
  • the fields and saving the PDF with "merge resources" could result in the
  • onts being saved incorrectly.
  • Updated eiDAS trusted keystore to latest certificates
  • "Optimization" added in 2.23.2 to reduce memory footprint of Noto fonts traded away too much speed for memory; Reverted most of it.
  • Fixed off-by-one error that could rarely result in the API creating a
  • ToUnicode map that garbled some letters on text extraction. Font specific.
  • Added support for GoTo actions to Structure Elements, part of PDF2 and likely
  • required for PDF/UA-2
  • Fix bug where sharing a PDFCanvas across two different PDFs could muddle some aspects of the the OutputProfiles, causing the later PDFs to not be PDF/UA.
  • Fix position of distinct but adjacent runs of text where the text was stretched.
  • Fixed clipping of mask on shading patterns.
  • Fixes for CFF fonts that don't terminate their real-numbers properly.
  • Fixed truncation during removal of 1-bit predictor stream on 8-bit streams.
  • Some fixes specific to math text layout.
  • Fix for longstanding issue with a particular type of "WAV" format in PDFSound.
  • Viewer: added PropertyChangeEvents to all ViewerFeatures (currently only the
  • "enabled" change event is fired, to notify when a feature is enabled/disabled.
  • Viewer: change icon when dragging document into the viewer to the "copy" icon, not the "move" icon.

New in Big Faceless Java PDF Viewer 2.24.1 (Mar 20, 2020)

  • Verified as working against Java 14
  • Several fixes in the "Structure Tree" classes to more accurately represent the way namespaces are used in PDF 2.0. Added the ability to set namespaces in the "role-map" - see PDF.getStructureTree for detail.
  • Added ability to get/set properties in the StructureTree "class-map", again see PDF.getStructureTree for detail.
  • Improved repair of StructureTree when pages contain hyperlinks to pages that have been removed before saving.
  • Changed the way text is extracted from the PDF from an adhoc mix of rules, to match *exactly* the "AGL" specification recently published by Adobe. Some older documents where the text is not encoded correctly may regress, others will have their text extraction improved.
  • Fixes bugs and reduced size of ToUnicode maps extending beyond the BMP.
  • Optimizations for reading PDFs with millions of pages.
  • Fixed an issue where PDFs with multiple revisions could be written in such a way as to trigger error messages in Acrobat.
  • Added parsing of Math tables from OpenType fonts, and some support methods for this in PDFGlyphVector to kern super/subscripts correctly.
  • Added support for OpenType Color fonts using the Microsoft "COLR" table. See the OpenTypeFont.Palette interface for details.
  • Fixes for WOFF2 fonts, fixes for non-latin encodings used in font-names, fixed font bounds calculations when reading fonts from a URL, fix font bounds where the font specifies USE_TYPO_METRICS.
  • Fixed errors applying kerning to text from OpenType fonts where the text is made of multiple scripts, eg hiragana and kanji
  • Correctly handle gradients where stop colors are in a mix of ColorSpaces.
  • The validity state of the middle signatures in a document with three or more digital signatures was sometimes incorrect. Now correctly consider changes applied in all revisions after the signature.
  • Correctly orientate digital signatures on pages with the "Rotate" flag set.
  • Parse and generate the PDF 2 "Path" entry for shape annotations, to represent a shape with curves without having to flatten it to straight line segments.
  • Viewer: we weren't correctly recognising PDF 2.0 documents!
  • Viewer: AbstractRegionSelector.setRegionShape to allow selecting different types of region, e.g. a fixed size box, a point, a single line and so on. SelectArea (which extends this class) also gets methods to optionally prevent the shape being moved, resized or extended beyond the page.
  • Viewer: source code cleanup to remove some "lint" warnings that can be turned on in javac.

New in Big Faceless Java PDF Viewer 2.24 (Dec 5, 2019)

  • INCOMPATIBLE CHANGE: Support for the PDF "structure tree" required by
  • PDF/An-a and PDF/UA has been completely reworked in this release, primarily
  • to improve PDF/UA support and add support for XML namespaces, new in PDF 2.0.
  • As a result some of the PDF/UA specific features in the OutputProfile class
  • have been removed and replaced with others that are more accurate and better reflect a world with both PDF 1.x and 2.x.
  • In the event that your code refers to individual features by name, rather
  • than simply as part of the large PDF/UA profile, you'll need to make code changes. Contact [email protected] for guidance on this.
  • INCOMPATIBLE CHANGE: some compatibility names for attributes have been
  • dropped from the map that can be supplied to the "beginTag" method in PDFPage,PDFCanvas and LayoutBox (for example, "ID" is no longer a synonym for "id", and "Scope" not longer a synonym for "Table:Scope"). Consult the PDFCanvas.beginTag API docs for details.
  • Added the PDF.getStructureTree() method as a simpler synonym for the same
  • method on PDFParser. The returned Document is now live, and can be manipulated to modify the PDF's logical structure. This means that merging two documents that each have a logical structure is easier; where we don't get the structure right automatically, it's possible to modify the tree with the regular Java XML packages.
  • Completely redid the PDF/UA profile. Finer grained reporting of invalid
  • structures has been added, giving the ability to selectively disable those
  • tests deemed a bit too "strong". Creation and validation of PDF/UA documents should be a lot more correct.
  • Fixed an issue introduced in 2.23.2 which would rarely result in text
  • disappearing or errors in Acrobat. We'd partially fixed it a while back but
  • never identified the root cause, an undocumented requirement in Acrobat.
  • Now finally fixed for good.
  • Fix an issue loading linearization tables as created by Oracle, resulting in our API complaining the linearization was damaged.
  • Audited and removed many changes that were happening unnecessarily, to reduce the number of object marked as changed when saving a PDF that previously had a digital signature.
  • Optimizations to OpenTypeFont layout should result in 10% faster text layout when making heavy use of GSUB/GPOS tables.
  • Added ability to load OpenTypeFont that consist only of a CMap and CFF table,
  • as generated by Adobe Illustrator 12.0

New in Big Faceless Java PDF Viewer 2.23.7 (Sep 27, 2019)

  • Improve our best guess as to exactly what Acrobat is doing when validating PAdES signatures.
  • Fixes to signing and verifying PAdES LTV signatures. We will now download missing CA certificates rather than just complaining they're missing.
  • Fixed regression introduced in 2.23.4 which could result in text not being displayed properly if the canvas was flushed at a particular stage in the workflow.
  • Include a list of "trusted root certificates" with the API, accessible from FormSignature.loadTrustedKeyStore(). This currently includes the root certificates required to validate signatures signed under the EU eiDAS regulations. This is why the Jar is 2MB larger than the last release.
  • Add a new "FN1" warning which is displayed when a font is being shared across multiple threads in a dangerous manner.
  • Fixed final issues reading WOFF2 format fonts - now passing all WPT tests.
  • Fixes relating to correctly identifying the end of an inline-image where the image has been intentionally truncated, rather than truncated due to damage.
  • Fixes for a number of XFA issues.
  • Fixed obscure deadlock when loading linearized PDFs from a web-server.
  • Fixed ICC profiles that use the same Matrix as sRGB but a different gamma curve; these were mistakenly being identified as sRGB, resulting in slightly incorrect colors when rendering to a bitmap.
  • Fix for PDFCanvas.drawPolygon where the polygon only has two points.
  • Fixed some issues to do with logical structure creation in PDF, which manifested by some of the text in Acrobat not highlighting correctly, or not being available to edit when "Edit PDF" is selected.
  • Fix an issue parsing Type1 fonts where the PostScript actually defines multiple fonts, as seen in a document created by Cairo engine.
  • Viewer: Fixed Save button becoming disabled if a Save fails under particular circumstances.
  • Viewer: Fixed "gray box" sometimes occurring when a thumbnail panel is moved around in the viewer (regression introduced 2.22)
  • Viewer: Fixed visual issues painting annotations at relatively high zoom levels, a regression introduced in 2.23.4
  • Viewer: Fixed some exceptions resulting from races during closing.
  • Viewer: don't close the parent frame when closing the PDFViewer unless we created it.
  • Viewer: fix issue which prevented the KeyStoreManager from working with custom KeyStore types (regression introduced 2.23.5)
  • Viewer: ensure callback to listener passed to PDFViewer.loadPDF() is called after all other callbacks.
  • Viewer: fix issue where deleting a page via the thumbnails panel could result in an incorrect selection.

New in Big Faceless Java PDF Viewer 2.23.6 (Sep 2, 2019)

  • Added the Ideographic Variation Selector list to the characters supported by
  • The Japanese StandardCJK fonts. Variation Selectors will also be silently skipped where not available.
  • Fixed regression introduced in 2.23.2 relating to the way text was marked
  • Up within a Structure Tree, which resulted in gaps when text was selected in
  • In Acrobat.
  • Fixed some issues with Kashida justification for arabic.
  • Fix for a particular type of gradient containing a hard color transition.
  • Fix for very rare, PDF-only variation on CCITT.G4 that interleaves image data
  • With normally invalid EOL markers (as made by Xerox Workcenter 7120).
  • It's now possible to synthesize the various Unicode space characters and the
  • Unicode U+2011 and U+2010 (hyphen and nbhyphen) from a regular space and regular hyphen/minus by setting an appropriate font-feature value.
  • Fix for 2D sampled shading functions.
  • Fix for issue reading inline images where the data has been deliberately truncated early.
  • Fixed an issue where Shading patterns could be damaged when preflighting a document.
  • Better text extraction for common Adobe InDesign method of embedding fonts.
  • Ensure superscript/subscript versions of the style have the same underline
  • And strikeout positions as the originals.
  • Fix deadlock when loading using the "linearized" loader.
  • Fix for XFA when datasets contains attributes with namespaces, fix for some
  • XFA binding issues, and performance enhancements for XFA datasets loading.

New in Big Faceless Java PDF Viewer 2.23.5 (Jul 31, 2019)

  • Added FormSignature.addAnnotation() method that takes a PDFCanvas for the appearance stream, as an alternative to setting it on the factory
  • Added OptionalContentLayer class, PDFCanvas.setOptionalContentDescriptor() and PDF.getOptionalContentLayers() methods to allow creating and editing optional content layers in the PDF.
  • Fixed bug in BarCode which could result in 1D barcodes (Code128 etc) being assigned the wrong height if the the "setWidth" method is called to resize them.
  • Work around some bugs in Acrobat when form fields use a variety of fonts.
  • Improvements to the way buttons with images are written out.
  • Fixed LayoutBox.getText() value if the text in question has been split onto multiple lines after opentype substitution.
  • Fixed text cursor if last character in the string was a non-spacing mark that was positioned vertically with the GPOS table (rare, but more common than it sounds).
  • Fixed position of hyperlinks created from an abstract Shape.
  • Reworked locking to avoid deadlock in font rendering (reported by a customer running 150 threads for several hours, so not a concern for most).
  • Fixed crash when rendering zero-sized annotations in the viewer.
  • Recognise the "cc" prefix when embedding creative-commons license information in the XMP metadata.
  • Viewer: fixes for signing with PKCS#11 SmartCards

New in Big Faceless Java PDF Viewer 2.23.4 (Jun 27, 2019)

  • Fixed regression where PDFs saved with a combination of encryption and
  • compressed XRefs were causing errors in Acrobat (introduced in 2.23.2).
  • Fixed regression from previous release where creating a new PDFCanvas from a PDFPage would incorrectly set a Transparency Group, which causes problems for PDF/A.
  • Predictors on LZW/Flate streams were implemented poorly. Now about 10x faster.
  • Optimizations of the way text is written, in particular if the Document Structure is being created, to reduce filesize.
  • Workaround invalid AES encryption of zero-length strings, as created by some products.
  • Fixed overzealous remapping of glyphs to the private-use area when extracting text.
  • Fixed errors when rendering Annotations with absurdly large dimensions.
  • Added experimental Kashida justification for arabic.
  • Fixed small-caps synthesis when used with OpenType fonts.
  • Added support for OpenType CBDT table to load color bitmap glyphs, as
  • sometimes used for Emoji.
  • Fixed a failure which could occurred when loading resources (eg fonts or images) direct from a URL.
  • Updated internal Unicode model to 12.0.
  • Viewer: improvements to the way the "dirty" flag is monitored, to prevent the
  • viewer from being closed without prompting the user. Also fixed the "Quit"
  • feature to trigger a window close event, rather than just calling System.exit.

New in Big Faceless Java PDF Viewer 2.23.3 (May 30, 2019)

  • Fixed two regressions in previous release relating to the way documents with
  • compressed XRef tables are structured. One which could break some PDF
  • processors, one which could hang when writing compressed, linearized PDFs
  • Changed the way radial, linear and mesh gradients with an alpha component are
  • created to (mostly) work around a bug in macOS Preview.app, and added support
  • for linear interpolation.
  • Legacy code cleanup relating to rendering shapes and styles in
  • PDFPage/PDFCanvas, for more efficient output when writing.
  • Added WOFF2 support to OpenTypeFont class; more robust parsing of
  • OpenTypeFonts with truncated tables
  • Fixed setInfo("Marked", true).
  • Fixed invalid rollover states on checkboxes which could cause them to seem a
  • bit odd when the mouse rolled over them in Acrobat.
  • Improvements to the way non-rectangular outlines for hyperlinks are stored.
  • Add "alt" text to structure output
  • Fixes to letter-spacing and kerning for right-to-left languages; fixed
  • transform applied for fake-italic.
  • Forcing recompression with OutputProfile.setRequired(RegularCompression) is
  • now guaranteed to never make the PDF bigger.
  • Fixes for a particular PDF with a strange form of JPX compression
  • Added PDFCanvas.setMask, to allow PDFCanvas to be created with a soft mask
  • Added PDFCanvas.setBox/getBox and PDFPattern.setTransform.
  • Fixed metadata profiling for non-core metadata.
  • Viewerdon't fail when dragging iconised windows about.
  • ViewerUndo/Redo keyboard shortcuts will work even if Menus are disabled
  • Vieweradded ThumbnailCopyAction

New in Big Faceless Java PDF Viewer 2.23.2 (Mar 8, 2019)

  • It is now possible for the PDF API to write linearized PDFs with "Compressed XRef tables"
  • Fixed LayoutBox bug, introduced in 2.22.2, that could cause text with -ve track kerning to wrap unnecessarily.
  • Some fixes to the way structured tags are inserted into the PDF
  • Fixed color shift converting DeviceCMYK to GrayScale profiles during Preflight
  • Creating a PDFCanvas from a PDFPage where only some layers were visible will now discard the hidden layers.
  • Mitigate a theoretical attack on PDF digital signatures as described at https://www.pdf-insecurity.org/signature/signature.html
  • Deprecated some recently added OpenTypeFont constructors and replaced with new ones that are better designed for use with OpenType collections.
  • Added PDFFont.getDefinedCodepoints() method
  • Fixed redaction of PDFs containing Separation ColorSpaces with spaces in the ColorSpace name
  • Reduced memory footprint for large OpenTypeFonts (eg the Noto fonts)
  • When preflighting, unused Separation ColorSpaces are now removed completely from the PDF. Separation Colors that are converted to process color are completely placed rather than just remapped, although the old behaviour of remapping the inks is available (see OutputProfiler.setRemapNamedInks)
  • Fixes for better error logging for some types of broken JPEG2000 images.
  • Bulletproofing XMP metadata extraction to handle buggy xpacket headers.
  • Corrected inheritance of Resource map during redaction
  • Updated the Chinese CMaps to include HKSCS-2016 and Japanese to include U+32FF
  • Added "implied" option to PDFFont, to allow the actual text to be inserted
  • into the Structure. Useful for languages making heavy use of OpenType fonts.
  • Added option to extract OpenType baseline information where available, and the PostScript font name.
  • Fix for 12-bit sampled functions
  • Fixes to handle various misformed PDFs

New in Big Faceless Java PDF Viewer 2.23.1 (Dec 17, 2018)

  • OpenType/CFF fonts that are not CID encoded will now be rebuilt as CID fonts on-the-fly as required. This finally removes the "OT8" warning, the workaround we put in to avoid bugs in the OS X Preview.app viewer, which was itself causing problems with some fonts when printing from Acrobat.
  • Fixed an issue where some OpenType fonts (specifically Noto Sans Arabic) would sometimes be missing a glyph when subset.
  • Deprecated OutputProfile.Feature.PurgeResources, as this step is now always run when the PDF is rendered.
  • Added DeviceNColorSpace.Builder, to allow creation of custom N-color ColorSpaces.
  • Added MeshGradient, to allow creation of "Coons Patch" gradients alongside the existing radial and linear gradients.
  • Fixed issue where the CIDtoGID map wasn't being applied to CFF fonts.
  • Fixed typo in Code128 preventing the backslash working.
  • Added BarCode.setText, to use custom text or a custom font on BarCodes.
  • Added PDFGlyphVector.setGlyphTransform, to manipulate an individual glyph
  • Fixed mismatch between a gradient fill and the alpha channel of that gradient fill, which occured if the gradient had a translate on its AffineTransform
  • Fixed incorrectly encoded transparent PNGs that would display as opaque.
  • Fixed rendering shading in a PDF when the shading contains an ExtGState
  • Special handling for "All" Separation in SpotColorSpace, for printing registration marks.
  • Slight improvements in render quality for particular type of Gouraud triangle shading.
  • Underline and Strikeout positions loaded from OpenType fonts were wrong by half the width of the line. Now fixed. Although this is a negligible change, anyone converting PDFs to bitmap and comparing pixels to look for changes may notice.
  • Fixed rasterizing PDF to a Graphics2D when the Graphics2D had a translating
  • AffineTransform, and the PDF itself contains Transparency Groups.
  • Added PDFGlyphVector.getOutline() method.
  • Fixed bug in ICC ColorSpace handling relating to GrayScale spaces defined against the Lab PCS.
  • Respect the winding rule when drawing a Shape to PDFCanvas, and added the "Miter Limit" property to PDFStyle.
  • IOExceptions due to damaged input encountered during Redaction are now warnings by default, as they are for rasterizing. Fixed a couple of errors occurring in redaction for certain types of Document.
  • Viewer: honour "UseNone" viewer preferences when opening a PDF, to hide the side panel.
  • Viewer: fixed Exception during PDFViewer.close which was introduced in the previous release.
  • Viewer: don't fail when saving to a new file (bug introduced a few releases ago).

New in Big Faceless Java PDF Viewer 2.23 (Oct 9, 2018)

  • Added PDFViewer.isClosing() to allow long-running features to shut down gracefully.
  • Fire a "selection" PropertyChangeEvent from TextTool when the selected text is changed, to make it easier for classes extending the viewer to respond to text selection.
  • KeyboardFocusManager appears to hold references to Keyboard shortcuts even after Menu items have been removed. We have added several last-ditch attempts to work around this to PDFViewer, and also decoupled the actions from the Swing Components to allow the Viewer to be garbage collected on close.

New in Big Faceless Java PDF Viewer 2.22.2 (Aug 1, 2018)

  • We're now distributing a JPEG-2000 decoder with the PDF library, supplied in
  • "bfopdf-jj2000.jar". Sources are at https://github.com/faceless2/jpeg2000.
  • This version fixes some bugs in the standard release, reduces the memory
  • footprint and removes some dependencies. We recommend adding it to the
  • classpath and removing any other "jj2000" Jar you may have already.
  • Rewrite of the Indic language shaper which was previously working properly for
  • Hindi, but not much else. Verified test results in Assamese, Bengali,
  • Punjabi(Gurmukhi), Gujarati, Kannada, Malayalam, Marathi, Oriya, Sinhala,
  • Tamil and Telugu.
  • Many associated fixes to OpenType font positioning, which may improve results
  • for other languages too (in particular most Urdu fonts are now working).
  • Improved heuristics for fonts that have non-spacing marks with advance.
  • Added OutputProfiler.ImageAction, to allow more control over downsampling or
  • recompression of images.
  • Fix for documents with Encryption Dictionaries containing indirect references.
  • Some minor ColorSpace math fixes
  • Refactored to remove some synchronization
  • Fixes for OSGi statements in Manifest
  • When applying a new signature to a PDF/A file, we now check the addition is
  • PDF/A compliant on creation.
  • Add cached for OCSP responses, which should speed up validation of multiple
  • signatures.
  • Viewer: Remove lingering reference preventing the final instance of the viewer
  • from being garbage collected
  • Viewer: BackgroundSignatureVerifier class verifies in background, not on EDT!

New in Big Faceless Java PDF Viewer 2.22.1 (Apr 28, 2018)

  • Reduced memory pressure when working with documents containing a
  • StructureTree in many simultaneous threads.
  • By popular request, added UPCA Barcodes as a distinct variation of EAN31, but
  • with slightly different text formatting.
  • Fixes for WOFF font format parsing
  • Fixed data being truncated after a U+FEFF character in the text when using the
  • non-OpenType layout engine, introduced in previous release.
  • Fixed issue that could result in two XMP packet headers in the metadata,
  • introduced a few releases ago.
  • Added PDFStyle.setLineBreakBehaviour to control the line breaking, and updated
  • line breaking rules to support latest release of UAX#14 as well as the
  • variations defined in css-text-3
  • Improvements to OutputProfiler.AutoEmbeddingFontAction should result in a
  • better choice of font.
  • Improvements to OutputProfiler.ProcessColorAction to skip conversion of
  • device gray, RGB or CMYK.
  • Improvements to the way the OutputProfiler repairs PDFs containing form fields
  • when trying to bring them into line with PDF/A
  • Write out a full CharSet when creating an OpenTypeFont - we need all glyphs
  • listed for PDF/A-2 and PDF/A-3, not just the used ones.
  • Rendering a page or annotation with severe structure problems would previously
  • throw an exception. We now render as much as we can and report a PP2 warning.
  • Fixes to allow the use of LinearGradient and RadialGradients containing alpha
  • values as fill or line paints in the PDFStyle class, and add support for
  • AffineTransforms on those classes.
  • Correctly apply ligatures when arabic is displayed left-to-right or non-arabic
  • is displayed right-to-left (useless, unless you are trying to pass testcases)
  • and more fixes to position of marks in arabic.
  • Fix ClassCastException when changing the ColorSpace of an indexed image,
  • introduced in previous release.
  • Speed improvements to the preflighting code when converting an image from one
  • colorspace to another. Also corrected the value of "type" being passed in to
  • OutputProfile.ColorAction. Note: these changes first appeared in 2.22, but
  • were missed from the changelog. This release fixes some small bugs added in
  • that release.
  • Added PDFImage.getResolution and PDFImage.getOrientation methods.
  • Viewer: fixed memory leak that could occur when verifying digital signatures
  • in a PDFViewer containing a single DocumentPanel, then closing and repeating.
  • Viewer: fixed NPE from DocumentPanel that sometimes occurred on closing.

New in Big Faceless Java PDF Viewer 2.22 (Mar 13, 2018)

  • The text layout model has been rewritten to accomodate fixes to the OpenType
  • layout engine and the bidirectional model. Due to floating point rounding
  • difference this will mean fractional sub-pixel differences to justified text.
  • INCOMPATIBLE CHANGE: We now have the ability to set an OpenType feature to
  • an integer, not just on or off. This is rarely required except for "swash"
  • letters, but it required a minor change to the API: PDFFont.getFeature and
  • PDFStyle.getFontFeature now return an int instead of a boolean.
  • INCOMPATIBLE CHANGE: Removed long-deprecated "requote" and "ligaturize" from
  • the PDFFont class, as these are incompatible with the new text model. These
  • were deprecated and the functionality rolled into PDFFont.setFeature in
  • release 2.11.21 (released Feb 2012).
  • Added new GlobalSignDSS class, to apply digital signatures using the new
  • GlobalSign digital signature service.
  • Added a new PKCS7SignatureHandler.SigningEngine class to allow the
  • "outsourcing" of some of the core tasks of PKCS#7 digital signatures to a
  • custom class (such as the GlobalSignDSS class).
  • A number of fixes made to the code for adding long-term validation
  • information to a signature (specifically for the Indian ID card certificate
  • hierarchy, but generally applicable).
  • Updated OpenType font handling to version 1.8.2 of the OpenType specification
  • (excluding the new Font Variations). Fixed a number of bugs relating to the
  • way glyphs are shaped and positioned using the OpenType engine, particularly
  • in the Indic languages and where multiple combining characters are used.
  • Fixed some of the more complex cases in the Bidirectional algorithm for
  • Arabic and Hebrew, to do with nested runs. The Locale of the LayoutBox is now
  • a critical part of the algorithm, so be sure to set it to the primary
  • language of the paragraph.
  • Updated internal Unicode model to 10.0.
  • Added support for Unicode "Variation Selectors" where available in the font.
  • These are primarily used for Chinese/Japanese fonts to resolve some of the
  • issues with Han unification.
  • Added quite a lot of functionality to the PDFGlyphVector class, to make it
  • useful for high-performance text layout not using a LayoutBox.
  • Added "italic" and "smallcaps" font-features, to allow synthesized italic and
  • small-caps to be created directly on a PDFGlyphVector.
  • Fixed more slowdowns relating to editing documents containing an existing
  • Structure Tree.
  • Added PDFPage.setUserUnit method, required to create very large pages in PDF.
  • Fixed rare bug in JBIG2 decoder.
  • LinearGradientPaint and RadialGradientPaint can be used as Paints in the
  • PDFStyle class.
  • Add additional space at end of line when it has been split, for PDF/UA text
  • extraction.
  • Added ability to create a PDFCanvas with a particular blendmode, via a new
  • constructor.
  • Removed some unnecessary work that was being done when adding text content to
  • the PDF; this could result in speed improvements if there is a lot of text
  • being added.
  • Speed improvements when rendering very large, very complex gradient shading
  • (specifically Coons Patch shading, types 6 and 7). Some pathalogical test
  • cases were so slow the appeared to have hung, speed is now back to normal.
  • Viewer: removed some lingering references to the previous PDF that could
  • occur when a single DocumentPanel is reused for multiple PDFs, rather than a
  • new DocumentPanel being opened each time (as would happen when MultiWindow
  • was turned off).

New in Big Faceless Java PDF Viewer 2.21 (Dec 14, 2017)

  • Several fixes to viewer when working with linearized documents, in particular when loading is cancelled before completion.
  • Removed hard-coded font sizes from a few points in the code, and added Util.setFontScale method as a means of scaling fonts in the viewer for HiDPI screens (far from ideal, but the best option we have in Swing).
  • Fixed regression from previous release where the Outline pane might not complete loading.

New in Big Faceless Java PDF Viewer 2.20.3 (Oct 20, 2017)

  • KeyStoreManager is working with PKCS#11 under Java 9.

New in Big Faceless Java PDF Viewer 2.20.2 (Sep 28, 2017)

  • Viewer: removed some references that would delay garbage collection of a linearized PDF that had its load from a URL interrupted until the entire PDF was loaded.
  • Viewer: don't allow save to a read-only file - previously this was allowed so long as the filename wasn't prompted for.
  • Viewer: added the option to disable the class prompting for HTTP authentication details, due to reports it was breaking SPNEGO (Active Directory) authentication when run as a JNLP application.
  • Viewer: added workaround for Java bug 8042020, the everpresent horizontal scrollbar under the Nimbus L&F.

New in Big Faceless Java PDF Viewer 2.20.1 (Jun 21, 2017)

  • Added OutputProfiles to validate and create PDF/A-2u, PDF/A-3u and ZUGFeRD
  • documents.
  • * This release brings our API largely into agreement with the industry-wide
  • "verapdf" test corpus for PDF/A validation - the exceptions are all the
  • subject of open queries. This has meant a large number of subtle changes to
  • the PDF/A profiles.
  • * Added a large number of new OutputProfile.Features to XMP to validate types,
  • and deprecated a few others (to cater for the previous item)
  • * Added OutputProfile.getClaimedTargetProfiles, to make validating a document
  • against all of its standards easier.
  • * Minor improvements to page extraction when text is overlapping
  • * A few minor tweaks to ensure we can create and parse documents from the
  • upcoming PDF 2.0 standard.
  • * Added FormSignature.setRequiredDigestAlgorithm(), to set the list of
  • allowable digest algorithms that can be used to sign a blank signature.
  • * Workaround to handle curious interpretation of PKCS#1 in DynaPDF signatures.
  • * Added bfo:key, bfo:pos and bfo:pdf attributes to the beginTag method, to
  • allow StructureTree nodes to spread over a more than one location in the PDF
  • * Cleaned up error reporting when trying to load a damaged font: damage is
  • only reported once per font in the logs
  • * Fixed long-standing, very subtle bug in PDFs we generate: we were setting the
  • whitepoint of any sRGB colors used to D50, in fact it should be D65. The
  • corresponding Matrix ensured the results were visually identical, but D65 is
  • more correct.
  • * Fixed an issue where we painted way more pixels than we needed to when a
  • SoftMask was used with a massive bounding box. Documents exhibiting this will
  • now render faster.
  • * More tolerant parsing of off-spec Radio Buttons in incoming PDFs
  • * When partially redacting an image that was compressed with DCT (JPEG)
  • compression, ensure the redacted image is compressed the same way. Although
  • this means two lossy compression cycles for the image, the alternative is
  • a potentially massive increase in file size.
  • * Viewer: a few changes to make it easier to recompile the classes into a
  • non-standard package.

New in Big Faceless Java PDF Viewer 2.20 (Apr 12, 2017)

  • Changed default encryption algorithm to SHA256. If you want to continue using SHA1 for signatures, you will now need to specify this explicitly.
  • Added full support for creation and verification of PDF/A-1a, PDF/A-2a, PDF/A-3a and PDF/UA compliant doucments. This includes new OutputProfiles, and a large number of new OutputProfile.Feature entities.
  • Fixed creation of new structure elements, broken in 2.19.1.
  • Fixed a bug in OCSP verification of signatures that would cause some verifications to fail.
  • Fixed very obscure issue where extracting a full Output Profile on a PDF containing PDF file attachments on N pages, where N >= the number of worker threads the PDF has (defaults to number of cores) could cause a deadlock.
  • Fixed a few obscure problems after running our PDF API against 15,000 documents from the "govdocs" corpora.
  • When rasterizing a PDF to a bitmap, confirm that fonts that claim to have a specific glyph do have it.
  • Fixed OutputProfiler.ColorAction not running on a newly created PDF.
  • Bulletproofing for various types of corruption in embedded OpenTypeFonts.
  • Reverted warning added in 2.19.1 referring to "invalid date"; specification changed without comment, so we must presume both formats are valid.
  • When rendering a PDF with missing glyphs in the font would previously give a blank space, now we attempt to locate a glyph that is theoretically visually identical, and print a warning.
  • Added various new OutputProfile.Features to identify the algorithms used in any digital signatures applied to the document.
  • Viewer: tested successfully against Java 9 EA builds.
  • Viewer: when running from JNLP, allow the "jnlp." prefix to be used on any of the properties, to alllow them to be easily set in the JNLP file.

New in Big Faceless Java PDF Viewer 2.19.1 (Mar 22, 2017)

  • Released on 2017-03-10
  • Fixed a bug introduced in the previous release where cloning a page by calling PDFPage(page) would cause an exception if the page was from a PDF containing structured content
  • Use "soft clipping" when rendering the PDF to a bitmap, to work around limitations in the AWT. This should result in considerably better ressults when converting certain types of PDF to a bitmap (in particular those documents that use a clip path and fill to draw text).
  • Setting the "TaggedPDF" feature to denied before applying the profile will remove the Structure Tree, root and branch, from the PDF. Previously we were only removing the root.
  • Repairing a PDF that contains multiple copies of the same field is now done the same way as Acrobat.
  • Don't fail when a font Widths array has > 256 entries.

New in Big Faceless Java PDF Viewer 2.18.8 (Oct 21, 2016)

  • Fixed a bug introduced the previous release, which could result in aNullPointerException when moving pages between PDF documents constructed in a certain way.
  • Fixed a bug where PDFParser.writeAsTIFF(PDFParser.BLACKANDWHITE) could result in a TIFF that used LZW rather than CCITT compression

New in Big Faceless Java PDF Viewer 2.18.7 (Oct 21, 2016)

  • Moving a page from one PDF to another will now migrate structured tags with it.
  • Some non Java-1.5 compatible code got into the codebase - removed, now running under Java 1.5 again.
  • Added option to force use of AWT font renderer for difficult fonts.
  • Fixed justification of text that makes use of non-breaking space characters.
  • Fix for pages where MediaBox coordinates were stored in the wrong order.
  • Fixed caching for colorspaces referenced by Indexed ColorSpaces - this could cause a catastrophic slowdown when rendering under some very specific circumstances.
  • Viewer: searching for text would return a selection one character too long.
  • Viewer: ensure icons are consistent size, was causing visual artifacts in some look-and-feels.

New in Big Faceless Java PDF Viewer 2.18.6 (Oct 21, 2016)

  • Workaround for AWT mangling of CMYK colors to RGB, which was causing errors when working with a CMYK shading pattern
  • Using the OutputProfiler to recolor an image could result in the file size increasing, as we used lossless Flate compression. Now, if the original was JPEG compressed then the recolored version will be too.
  • Fix for Identity ToUnicode maps
  • Acrobat places undocumented requirements on how TrueType fonts used in forms are stored. We have accomodated this with a nasty hack since 2.17.1, but this has inadvertantly broken the (correct) handling of these field when the PDF is loaded back into our API for further processing. This release adds code to "un-hack" the original hack for display.
  • Viewer: fixed some issues with the toolbar layouts, introduced in the previous version

New in Big Faceless Java PDF Viewer 2.18.5 (Oct 21, 2016)

  • Fix for absurdly large tiling patterns that were causing an integer overflow
  • Fix for ThreadLocal leak in viewer which could result in a memory leak if many PDFViewer instances were created
  • Better rebuilding of PDFs that contain damaged cross-reference tables, we now can usually recreate the version history.
  • Viewer: fixed the way menu separators are added to make it easier for the menus to be customized with new features
  • Viewer: improvements to text extraction for arabic and hebrew text.

New in Big Faceless Java PDF Viewer 2.18.5 (Jun 30, 2016)

  • Fix for absurdly large tiling patterns that were causing an integer overflow
  • Fix for ThreadLocal leak in viewer which could result in a memory leak if many PDFViewer instances were created
  • Better rebuilding of PDFs that contain damaged cross-reference tables, we now can usually recreate the version history.
  • Viewerfixed the way menu separators are added to make it easier for the menus to be customized with new features
  • Viewerimprovements to text extraction for arabic and hebrew text.

New in Big Faceless Java PDF Viewer 2.17.1 (Jul 29, 2015)

  • Rewrite of the StructureManager class to fix numerous bugs, and tested with JAWS screen reader
  • Corrected subtle error in L*a*b* ColorSpace to RGB.
  • Added Form.isXFA, for quick checking of XFA.
  • Fixed PDFPage.drawShape handling of Quadratic bezier
  • OutputProfile has a new "setOutputIntent" method, to set the intent without going through the constructor.
  • Fixed handling of soft-hyphens, which would not align properly and occasionally disappear altogether.
  • Handle OTF fonts that are missing everything except the CFF table
  • Added BarCode.getContentRectangle, for exact position of barcodes
  • Added two new RenderingHints to PagePainter to help those implementing their own Graphics2D object identify text drawn as shapes
  • Align behaviour when dealing with damaged DCT image content to that of Acrobat, to handle documents that rely on it.
  • PageExtractor.Text now has a getOutlineColor method, and this and getColor will return null if the text is drawn in a mode that doesn't fill (or stroke)
  • Behave correctly when a user-password but no owner-password is set on a StandardEncryptionHandler
  • Fix bad-glyphs error when changing the value of a field that uses an embedded font, then immediately flattening the form.
  • Don't reset arabic/hebrew documents to right-to-left binding when saving
  • More fixes for bad XFA documents
  • Fix for checkboxes with values that are punctuation
  • Fixed rare case where editing certain PDFs could break the "Reader Extensions" signature in Acrobat.
  • Added PDFParser.setPrintAsImageResolution, to control the resolution of the image for printing. This can be useful for memory-constrained environments.
  • JavaScript was getting the timezone wrong for date/time fields, now fixed.
  • Removed memory-leak potential for a certain customer who is torturing our viewer API in a particularly horrendous way
  • Improved our guess for the MediaBox of a page where it's not specified (we now assume it's the same as the neighbouring ones).
  • Fix for breaking behaviour under Java 5 for some documents.
  • Logging has been modified to allow the system to be tapped into, and modified the viewer to report these via the new "WarningNotifier" Viewer feature.
  • Some more subtle PDF/A validation tweaks based on a new test corpus.
  • Added awful hack to work around Acrobat bug when using a CID font in a form.
  • Creating a PDFCanvas from a Page will use the smaller of the CropBox/MediaBox rather than just the CropBox.
  • Text Extraction without a valid license no longer replaces "e" with "a", but changes the first word extracted on each page to "DEMO" instead.
  • Viewer: many protected methods in ViewerWidget made public
  • Viewer: tweaked the "Save" feature changes in the previous release to better cope with missing/locked files, Windows locking, and other edge cases.
  • Viewer: added EmbeddedFilePanel to display embedded files
  • Viewer: when saving, use a PDF file suffix for files converted from bitmaps.
  • Viewer: fixed unusual situation where page zoom could get stuck on 101%
  • Viewer: fixed "ghost" window after returning from full-screen mode
  • Viewer: fixed NPE when can occur occasionally when there are no SidePanels
  • Viewer: many small "snagging" issues fixed.

New in Big Faceless Java PDF Viewer 2.17 (Apr 1, 2015)

  • Viewer: made "Save" feature save without prompt, and new "SaveAs" feature will prompt for the filename - they now function exactly as a "Save" and "SaveAs" feature would be expected to, but due to the change in functionality in Save this release is tagged 2.17 rather than 2.16.4
  • Reduced memory footprint when rendering very large documents containing an old-style XRef table. This can make quite a difference for some files.
  • Support the JPEG-2000 API at https://github.com/jai-imageio/jai-imageio-jpeg2000 as well as the legacy Sun version of the same code, and mitigate a memory leak in both versions.
  • PDF/A-2 fixes - applied the changes from the technical corrigenda; added the "XMPMetaDataInfoMismatchTrailingZero" and "CIDSetCoverageIncompleteTolerant" features to the OutputProfile to deal with some ambiguity in the spec; fixes to the CIDSet font object for PDF/A-2; fixes to handling of the .notdef glyph.
  • Print a warning rather than throw an exception when rendering a PDF to a Graphic2D with no alpha channel - it will work sometimes, just not always.
  • Removed unused "cloneEntry" method from Cache interface.
  • Correct text size calculation when extracting text and the text has been scaled unevenly.
  • Allow files that contain an invalid PDFName to be read without exceptions.
  • Fix for Type 1 fonts that claim to use a custom encoding.
  • Fixed redaction of images where the image detail is stored in the mask, not the image itself.
  • Some improvements to the way we modify documents make it less likely that we will break a reader-extenions signature unnecessarily.
  • Fixed repair of compressed XRef PDFs with damaged streams.
  • Fixes to allow an OutputProfile to be set on a PDF twice.
  • More fixes for XFA, this time to do with edge cases in the clauses and FormChoice fields.
  • Viewer: fixed a deadlock in the PagePainter which could be triggered by JavaScript in the PDF modifying the form data.
  • Correctly handle TTF fonts with "0/1" cmaps - was mostly working before, but not always.
  • Removed assumptions preventing the viewer being used in an SWT application.
  • Fixed clipping for Type3 fonts, previously working in 99% of cases, now 100%.
  • DiskCache uses File.createTempFile, to allow multiple JVMs to run with the same cache directory.
  • Viewer: quicker freeing of resources when a page paint is interrupted - this should result in a much lower memory footprint when scrolling rapidly through a document.
  • Viewer: fixes to handling of temporary files in Save and SaveAs on Windows.
  • Viewer: allow runtime overriding of whether a file loaded by an Importer is added to the "Most Recently Opened" list.
  • Viewer: when saving the PDF, the stream it was loaded from is closed. This has no impact for most, but will allow the file to be deleted immediately on Windows.
  • Viewer: don't allow DocumentPanels to be dragged so far out of the Desktop that they can't be dragged back.
  • Viewer: the Quit feature now calls PDFViewer.close() first.
  • Viewer: fixes to navigation in ThumbnailPanel, and increased max thumbnail size.

New in Big Faceless Java PDF Viewer 2.16.3 (Jan 24, 2015)

  • Fixed linearized loading, broken in previous release
  • Fixed rare bug in Acrobat X (AES256) encryption which could result in invalid encryption or a failure to decrypt.
  • Fixed NullPointerException after calling FormElement.duplicate and when dealing with an annotation that has no rectangle, or for Screen annotations with no "Type" field.
  • Don't fail when XFA form values are illegal according to AcroForm.
  • Fixed handling of format events in JavaScript, broken in previous release.
  • Fixed display of soft-hyphens when laying out text, broken a few releases ago.
  • Viewer: fixed the behaviour of the Save dialog when the filename is modified in the text field; depending on how the field was blurred and the L&F, the the new filename was sometimes ignored and the previous filename used (since 2.16.2), and fixed the display of save options (currently only for TIFF) for the various Look & Feels. This also fied a NullPointerException that was specific to a particular series of selections under the Windows L&F.
  • Viewer: fixed some focus issues relating to multi-line text items.
  • Viewer: clicking with the "zoom to selection" tool caused the viewer to try to zoom to an infinite zoom level and hang - now fixed.
  • Viewer: Fixed deadlock which could occur when a field changed the value of another field in the viewer using JavaScript.
  • Viewer: Fixed handling of JavaScript events, in particular, an event which triggered another event wasn't always being handled properly.
  • Viewer: deleting a page in JavaScript that contains the sole Widget for a field will also delete the field, to match Acrobat's behaviour. Also fixed the value of Field.page, which was off by one.
  • Viewer: JavaScript closeDoc method closes window regardless of dirty state, to match Acrobat's behaviour.

New in Big Faceless Java PDF Viewer 2.16.2 (Dec 17, 2014)

  • Fixed exception when rendering newly generated PDFs for the second time, broken in previous release.
  • Added Deutsche Post "PostMatrix" barcodes
  • Fixed exception when trying to paint XObject with SoftMask that has been clipped away entirely.
  • Fix to choreography issue setting line endings in line annotations.
  • Fix to edge-case for XFA picture clause processing
  • Fix for particular format of broken OpenType tables.
  • PagePainter.drawSubImage no longer overrides the clip on the Graphics2D
  • Viewer: Thumbnail panel scrolling is improved, particularly when reordering pages.
  • Viewer: Fixed error when trying to save PDF to a new file, broken in previous release. Filename is updated to match when the file format is changed, and any additional options for the selected file-format are displayed without a popup.
  • Viewer: Many settings (e.g. zoom level, last side panel selected, size of side panel, size of thumbnails) are stored in preferenced and will be used the next time the viewer is loaded if nothing else has a preference.
  • Viewer: Improved keyboard navigation. Ctrl-Enter or Ctrl-Esc can be used to OK/Cancel a dialog, and Ctrl-Up and Ctrl-Down can be used to page through the document as well as PageUp/PageDown (which are missing on many laptops)
  • Viewer: MultiPageDocumentViewport was holding references to a closed PDF longer than it needed to - now fixed.
  • Viewer: many small usability improvements.

New in Big Faceless Java PDF Viewer 2.16.1 (Nov 22, 2014)

  • Our tolerance of damaged PDFs was reduced in 2.16 and we were more likely to throw an error during load than in previous versions - now fixed.
  • Using an unembedded TrueType font will now work even if the font is missing a POST table. Also some related fixes to parsing unembedded fonts.
  • Some memory improvements for certain workflows relating to modifying existing pages.
  • Corrections to XFA formatting to handle some unusual cases.
  • Added PageExtractor.Text.getVisualBounds(), to give an exact visual bounding box for text. Also fixed some related bugs in PageExtractor.cropText
  • Viewer: correctly mark a PDF as dirty when a hidden form field is changed
  • Viewer: fixed round trip edits of text annotatations in non-ASCII languages.
  • Viewer: fix for a curious race condition relating to intiialization of JFileChooser
  • Viewer: don't fail with exception if OS has no default printer set.
  • Viewer: Allow Save feature to be disabled unless PDF is "dirty"
  • Viewer: Allow configuration of margins size and border colors for Viewports
  • Viewer: Allow replacement of the default TransferHandler, to intercept copy/paste operations.
  • Viewer: Added Importer.addToMostRecent, to prevent a file being added to the "Most Recently Loaded" list.
  • Viewer: corrections to Chinese translation

New in Big Faceless Java PDF Viewer 2.16 (Sep 6, 2014)

  • We're finally using generics in our method signatures both internally and externally throughout the library, including the viewer. This means a few methods have had generics added to their signatures, and in one or two places the signatures have changed. This shouldn't affect existing classes but source code being (re)compiled against this Jar may need tweaking.
  • Here's a list of the changed method signatures:
  • Collection

New in Big Faceless Java PDF Viewer 2.15.3 (May 21, 2014)

  • Several fixes to XFA, in particular regarding field formatting.
  • Improved algorithm for text extraction now gives better results for most documents. Added identification of super and subscript digits from the text.
  • Changed mapping from PDF font to OS font from 1:1 to 1:many, required to correctly render characters from the more recent HKSCS supplements on Windows.
  • Identified and fixed a bug in the official Adobe-CNS-6 mappings for CIDs 16976 and 16977 (U+24156 and U+24157, both from HKSCS-2008), which had the wrong Unicode values. The "bfopdf-cmap.jar" file has changed as a result.
  • Several fixes for JavaScript under Java 8
  • Handle ToUnicode maps that map every possible codepoint to identity in a saner way.
  • XMP metadata now requires namespaces end in a '/' or '#', to match Acrobat's incorrect implementation of bizarre and entirely unnecessary clause in badly written specification (ISO 16684-1:2011(E) 6.2, p14)
  • Don't decode an image in PageExtractor.Image just to get its dimensions
  • Fix infinite loops when particular values passed into pathArc, and when the PageLabels in a PDF has corrupted data.
  • Fixed font sizing of text with small-caps, broken a few releases ago
  • Moving pages between documents more reliable for files created with NitroPDF.
  • Correctly render text with font size < 1.
  • Fixed subtle and long-standing bug triggered by printing certain documents
  • containing an inline image.
  • Subtle correction to PDF/A-2 and A-3 rules regarding default page blend modes
  • Viewer: Save dialog works when no Exporter features are defined

New in Big Faceless Java PDF Viewer 2.15.2 (Mar 4, 2014)

  • Added generics to method signatures where appropriate. Java 4 is supported (as before) with the "bfopdf-14.jar" Jar.
  • Tested and verified with Java 8 - mainly adding support for the "Nashorn" JavaScript engine.
  • Added signing/verifying of PAdES signatures to AcrobatSignatureHandlerFactory
  • Added support for the latest release of the Hong Kong Supplementary character set (HKSCS-2008) to the MSung and MHei fonts. The changes for this are in the "bfopdf-cmap.jar" as well as the core Jar, so remember to upgrade both.
  • Faster cloning of PDFs with PDF(PDF) constructor
  • If an OutOfMemoryError occurs when drawing a bitmap image while rendering the page, we'll try to draw it at a lower resolution before failing completely.
  • Viewer: aded facility to load the KeyStore from a Jar
  • Viewer: When calling Importer.setFile(), if the file is not absolute the Save dialog will default to the last directory used by the user. Useful for saving files loaded from streams or URLs.

New in Big Faceless Java PDF Viewer 2.15.1 (Mar 4, 2014)

  • Viewer: Fixed memory leak when reloading PDFs in the same PDFViewer.
  • Viewer: Fixed exceptions that sometimes occur when changing the DocumentPanel's PDF, as is done when the MultiWindows feature is disabled.
  • Viewer: Fixed position of window after zooming to selection, selecting text in a search panel, or otherwise running a GoToFitRectangle action when a CropBox is set on the page.
  • Fixed race condition in PDF, only apparent if you're accessing it simultaneously from multiple threads, as we are in the viewer since 2.15

New in Big Faceless Java PDF Viewer 2.15 (Mar 4, 2014)

  • No change, but we've renumbered the release to 2.15 because the behaviour of
  • the PDF page list is, technically, an API change.

New in Big Faceless Java PDF Viewer 2.14.1 (Mar 4, 2014)

  • Added support for loading linearized documents to the viewer - if you want your custom features to take advantage of this then they may need rewriting, but should have no impact for most.
  • Added PDF/A-2b and PDF/A-3b support to the OutputProfile class, and fixed a few (very specific) issues with PDF/A-1b.
  • Added support for creating PDF portfolios.
  • Pages can now categorically only belong to one document. This was enforced half-heartedly with previous releases, but this release is more rigourous. Pages can now be rearranged in the list or moved between documents, with an iterator if preferred, and they will only ever exist in one place at a time.
  • Fixed names of inks in Separation (Spot) colors, broken a few releases ago
  • Fixed subtle but long-standing issue with glyph position, usually only noticable in particular symbol fonts. Improved rendering of glyphs on Windows.
  • Made public our LabColorSpace class to allow colors defined in the CIELAB space. Primarily useful as a means of defining PANTONE Spot colors.
  • Correctly identify documents with Spot colors and RGB alternates as containing RGB - broken a few releases ago. Fixed a few other edge-cases relating to colorspaces and the OutputProfile class.
  • Font features can be set on the style as well as the font - which means a font can have a feature enabled for a single word in a LayoutBox without needing to clone it. Deprecated PDFFont.linearize as part of the cleanup in this area.
  • Changed manifest to allow applets to run with (ill-considered) changes made in Java 7u45.
  • Fixes to RTL text processing with OpenType layout algorithm
  • When profiling or extracting text, don't load unembedded fonts if we don't need to.
  • Fixes to repairing bookmarks
  • Viewer: will prompt if a password is required when loading a PDF over HTTP.
  • Viewer: added cut/paste option for pages, and correctly order pages cut/pasted this way.
  • Viewer: fixed failure to redraw after reordering pages in some circumstances
  • Many other small fixes and improvements

New in Big Faceless Java PDF Viewer 2.14 (Mar 4, 2014)

  • Basic support for Linearized or "on-demand" loading. This is a large revision which allows Linearized or "web-ready" PDF files to be loaded from an HTTP URL in the background. Many changes still need to be made to the Viewer to allow for this, but this revision puts the necessary changes into the core API.
  • New methods are in the PDFReader class and PDF.getLoadState(), and new classes are LoadState and LinearizedExeption.
  • Existing functionality for non-linearized PDFs remains unchanged.
  • Added new methods to PDFReader - setSource, addEncryptionHandler - and deprecated (with replacement) some of the more convoluted constructors.
  • Increased speed when concatenating very large PDFs and merging resources by several orders of magnitude.
  • Fixed typo when purging resources which deletes any non-hyperlink annotations.
  • Fixed issue resulting in missing text when flattening Forms in rare PDFs.
  • Added PDFPage.setMeasurementUnits, to assign real-world dimensions to an area of the page (useful for CAD or Geo PDFs).
  • Fixed PDF/A related issues when calling PDF.setMetaData.
  • Modified XMP metadata creation to never include a UUID, in line with latest revision of XMP specification (to produce more acceptable PDF/A files).
  • Progress of save is reported much more accurately, and progress on load can be reported via new PDFReader.getProgress() method.
  • Fixed rare issue when merging resources, which could result in fonts with missing glyphs.
  • Conversion to bitmap on Windows machines with huge numbers of installed fonts could be slow - now cache the list.
  • Added the option to discard rather than repair damaged form fields when repairing a damaged PDF on load: set the "RepairRemoved" property to not-null.
  • Fixed requote feature in LayoutBox where there are complex nested quotes.
  • Viewer: fixed some Event Dispatch Thread violations when dialogs are displayed by the KeyStore management classes.
  • Viewer: use the ".pdf" suffix when saving a PDF created from an image.
  • Viewer: API change: the DocumentViewport.getNextSelectablePage has changed to DocumentViewport.getNextSelectablePageIndex. Shouldn't matter unless you're creating a custom Viewport.
  • Viewer: multi-line annotations do not add extra newlines on every edit.

New in Big Faceless Java PDF Viewer 2.13.2 (Mar 4, 2014)

  • Map returned from PDF.getNamedActions() didn't fully implement Map interface.
  • Added ColorContent, ColorImage, GrayscaleContent and GrayscaleImage to OutputProfile class, to categorically determine if a PDF contains color or grayscale content.
  • Slightly modified column spacing during text extraction - previously the two columns would overlap by one character.
  • Minor fixes for some specific damaged PDFs.
  • Removed the last finalizers from the API - although most use-cases wouldn't have created many finalizable objects, there are certain ways to use the API that do and this should help performance in those situations.
  • Viewer: reverted Java 1.5 incompatible change in previous release.
  • Viewer: ensure action() method is always called in our features (needed by overloaders - reverting change in previous release).
  • Viewer: fixed occasional NPE from PagePanel.doLayout on deleting annotation.
  • Viewer: fixed order of activated/loaded/deactived events.
  • Viewer: improved french translation.

New in Big Faceless Java PDF Viewer 2.13.1 (Mar 4, 2014)

  • Fixed NullPointers which could occur when working with documents that had been cloned, a problem introduced in the previous release.
  • Fixed clash between Tomcat ClassLoader and JavaScript sandbox, which would result in exceptions and no JavaScript being executed (since 2.11.25)
  • Correctly render form fields that have their style changed during formatting
  • Correctly clip Shading patterns that specify a BBox
  • Don't allow invalid CreationDate or ModDate to be set in PDF info dictionary.
  • Correctly position text with vertical writing direction.
  • Don't fail on documents with existing but zero-size MediaBox or CropBox
  • Viewer: allow ViewerWidgets to define javax.swing.Action and share that action between buttons, menus and potentially other objects. This makes for easier code when that Action has complex rules for when it's enabled (eg it depends on the DocumentPanel permission). See ViewerWidget API docs for details.
  • Viewer: fixed memory leak when repeatedly opening Documents in a viewer without MultiWindow, added in previous release.
  • Viewer: corrected the order of DocumentPanelEvents when closing Documents.
  • Viewer: added dual-page view (two-up)
  • Viewer: Opening a PDF can now be properly (ie immediately) cancelled
  • Viewer: background tasks are automatically cancelled when their parent window is closed.
  • Viewer: correctly run JavaScript actions after the first in a linked-list of actions on a Widget
  • Viewer: fixed race when rapidly scrolling through PDF which could result in Annotations not being rendered correctly
  • Viewer: correctly deal with pages being deleted by JavaScript during load
  • Viewer: corrected ordering of overlapping annotaitons, lost in a previous revision
  • Viewer: corrected parenting of dialogs when Viewer is itself in a JDialog
  • Viewer: corrected order of OK/Cancel buttons when LAF is Nimbus on Windows
  • Viewer: corrected "zoom to fit" operation on SinglePageView

New in Big Faceless Java PDF Viewer 2.13 (Apr 2, 2013)

  • Many internal changes paving the way for improvements in future releases.
  • Fixed an exception when running JavaScript under Java 5
  • Allow recompression of DCT encoded images by denying OutputProfie.FilterDCT
  • Fixes to JavaScript run when a field is flattened
  • Treat truncated tables in OpenType fonts as missing rather than failing.
  • Regression fix relating to right-aligned text, broken in the last release
  • and mainly reproducible in the Report Generator
  • Added improved "requote" feature to PDFFont, deprecate PDFFont.requote method
  • Fix for limitations in Windows relating to fractional font metrics
  • Ignore embedded ColorSpaces in images that are valid but wrong order
  • Accept XMP PDFs with missing template or datasets
  • Added OutputProfile.PDFPortfolio, to identify PDF portfolios when loaded
  • INCOMPATIBLE CHANGE: Viewer: AreaSelectionAction and TextSelectionAction
  • interfaces both have a new "isEnabled" method which must be implemented.
  • Viewer: Added "permissions" to the DocumentPanel, which are a superset of
  • the restrictions imposed by encrypted documents. This allows us to temporily
  • remove the ability to save (for example) and allows us to respect limitations
  • imposed by a digital signature, a background task or anything else.
  • See DocumentPanel.hasPermission and DocumentPanelEvent.permissionChanged
  • Viewer: Specifying the "respectSignatureCertification" option will respect the
  • limitations placed on a PDF containing a certifying signature. This is not
  • the default behaviour for backwards compatibility. See DocumentPanel
  • initialization parameters documentation.
  • Viewer: when selecting a character in the middle of a long line of text, one
  • bug could cause the drawn rectangle to be out by up to half a character, and
  • another could cause the selection to be short by one character. This could
  • cause problems when redacting part of a word.
  • Viewer: repaint pages in SinglePageDocumentViewport after rotation
  • Viewer: allow cancelling when importing or exporting an image
  • Viewer: better management of long running background tasks.
  • Viewer: added before and after hooks to the Exporter class, which can be
  • used by custom subclasses to modify a PDF before and after save if necessary.
  • Viewer: clean up the PDFViewerApplet's resources when it's destroyed.
  • Viewer: fixed potential deadlock when annotations are being rebuilt while
  • thumbnails are painted.
  • Viewer: fixed coordinates when jumping to hyperlink that specifies all four
  • Viewer: NetworkSave fires Doc/WillSave and Doc/DidSave JavaScript events
  • Viewer: improvements to german translation
  • Viewer: many small fixes resulting from extensive testing

New in Big Faceless Java PDF Viewer 2.12 (Oct 27, 2012)

  • Text Extraction will only decode images if they're asked for, which should speed up extraction by a large factor for some documents.
  • Text Extraction now has hooks to "recode" an incorrectly encoded font, although the mapping must be created manually.
  • Revert change to LayoutBox from 2.11.22 relating to trailing spaces on a line.
  • Improvements to color fidelity, particularly relating to shading patterns.
  • Removed unnecessary restriction on setting ModDate and CreationDate in PDF - these are still set automatically, but it's now possible to override them.
  • Some dashed lines were turned to solid when rendering - now fixed.
  • Correctly render (rare) documents with uncolored Tiling pattens.
  • Correctly render documents with unfeasibly large soft-masks, as sometimes created by InDesign 6. Previous builds would run but would fade graphics with a blocky appearance.
  • Fixes for various incorrectly constructed PDFs and PNGs.
  • Correctly resolve relative URIs in hyperlinks where the PDF has a a Base URI.
  • PDF.getFullOutputProfile no longer locks entire PDF object for its duration, which could cause deadlocks in the viewer.
  • Viewer: reworked the event notifications between the PDF core and the viewer, resulting in less synchronization and better stability.
  • Viewer: Changing or closing a PDF in a DocumentPanel may now call PDF.close(). This will immediately free resources for the PDF (allowing the file to be deleted on Windows), but if anyone is still holding a link to the PDF object after its DocumentPanel has closed it will cause problems. This is not on by default but may be set with the "org.faceless.pdf2.viewer2.EarlyClose" property.
  • Viewer: PagePanel completely refactored to better handle interruptions and fix a number of special case rendering errors. Note this release does not allow the page to be changed once set.
  • Viewer: Windows L&F now has Cancel button on the right - the Windows way.
  • Viewer: improvements to ThumbnailPanel. Added new ThumbnailSelectionAction subinterface and three implementations to delete/extract/rotate thumbnails. This approach makes it possible to add custom actions to the ThumbnailPanel as Features. Also cleaned up keyboard control, selection with right button, resize when a page is rotated, and better release of resources when the DocumentPanel is closed.
  • Viewer: Text selection (via TextTool) can now work in "natural" or "display" order - for documents created with columns or out-of-order text, this affects how drag selection of text works.
  • Viewer: added new "stateChanged" event, which is a generic way to inform the viewer that something transient has changed - eg a signature was verified.
  • Viewer: undo/redo of annotations correctly updates modification & creation date, and the author can optionally be changed too
  • Viewer: fixed text selection of rich text when text on a page is not strictly top-left to bottom-right.
  • Viewer: NetworkSave will pause background tasks, fire JavaScript Doc/WillSave and DidSave events and clear the "dirty" flag on the DocumentPanel, exactly as the same as the regular Save feature.
  • Viewer: correctly position page on GoToRectangle actions.
  • Viewer: added NullDocumentViewport, to completely disable the DocumentViewport in a PDF. If this is used at all, we anticipate it's by people who want just the thumbnail panel visible.
  • Viewer: improved German translation, moved page rotation to "edit" rather than "view" menu (as it changes the PDF).
  • Viewer cleanup: removed some very old deprecated code; many small bug fixes