iOS framework 4
4.6.0 (2025-10-07)
New features
Added
ReaderView.addOnRendererScrollHeightChangedEventListener(listener: OnRendererScrollHeightChangedEventListener)andReaderView.removeOnRendererScrollHeightChangedEventListener(listener: OnRendererScrollHeightChangedEventListener)to manage listeners notified when a scrolling renderer’s scrollable height changes.Added the option
EpubContentProcessingOptions.addTabIndexToMediaElements. When set to true,tabindex="0"is added to non-interactive media elements (e.g., video, audio, img). This improves accessibility for screen reader and keyboard users by enabling focus and interaction with media elements.
Bugfixes
Fixed an issue on iOS where
OnActiveRendererChangedListener.onActiveRendererChanged(oldRenderer:newRenderer:)would be invoked with the same renderer for botholdRendererandnewRenderer.Fixed an issue where certain elements were given
tabindex="-1"when callingReaderView.focusOnReadingPosition, preventing focus via standard keyboard navigation (e.g., Tab).Fixed an issue where publication content that changed
overflow-xstyling could break reflow due to browsers implicitly settingoverflow-ytoauto.iOS/iPadOS 26: Worked around a TTS bug where text was misinterpreted as SSML, breaking TTS when text included
<,>, or&. We now escape these characters on iOS 26 and iPadOS 26 by default. Disable viaColibrioReaderFramework.platformWorkaroundOptions.escapeXmlInTtsUtterancesOnIos26 = false.Fixed an issue where pointer events on a
ReaderViewAnnotationrendered inSingleDocumentScrollRendererreported an incorrectevent.target.frameworkComponent.Fixed an issue where
TtsUtteranceData.nodeDatareferenced the parent element for elements withalt/alttext(e.g.,<math>withalttext), instead of the element itself.
4.5.0 (2025-08-29)
New features
Added two new options,
injectionPointStartUnprocessedandinjectionPointEndUnprocessed, toEpubReaderPublicationCustomCssOptions.CSS injected using these options is not affected by
publicationStyleOptions. This is useful for cases such as customizing the::selectionpseudo-element without being overridden by thepaletteoption, for example.
Bugfixes
Fixed an issue where
ReaderViewdid not stay synchronized withSyncMediaPlayerwhen seeking to the end of the timeline.Fixed an issue where a loader briefly disappeared during navigation.
Fixed an issue where
SyncMediaPlayer.readerViewSynchronizationWaitBehaviorset to.waitOutsideAdjacentdid not always allow playback when the timeline position was within the previous or next spread.Fixed an issue where
OnSelectionChangedListener.onSelectionChanged(selectionData:)was not invoked when selecting content in the first reader document.Fixed an issue where
ReaderView.focusOnReadingPosition()sometimes focused on the oldreadingPositionwhen called right afterReaderView.goTo().Fixed an issue where reflowing EPUB content into pages could result in an error when elements with
position: absolutewere nested inside inline elements withposition: relative.Fixed an issue where the
ColibrioAudioPlayersometimes did not play a segment to its end.
4.4.2 (2025-07-25)
Bugfixes
Fixed an issue that prevented EPUB files larger than 4.2 GB from loading correctly.
Fixed an issue where
ColibrioAudioPlayer.playbackRatewas not functioning as expected.Fixed an issue where
OnMediaElementEventListenermethods sometimes did not fire when they should.
4.4.1 (2025-07-04)
Bugfixes
Fixed a bug where performing a
goTo()while using theSingleDocumentScrollRenderercould result in areadingPositionthat differed from the one passed togoTo().Fixed an issue where iframes pointing to
httporhttpsURLs would cause the entire content document to become sandboxed, even whenEpubReaderPublicationOptions.remoteResourcesNonScriptedDocumentsOptions.policyTypewas set to.allowAllor.whitelist. This prevented embedded YouTube iframes from functioning correctly, for example.
4.4.0 (2025-06-12)
New features
Added new options under
ReaderViewOptions.pageContainerOptions.titleOptionsthat can be used to configure thetitleattribute on page container<iframe>elements.
Bugfixes
Fixed an issue where the CSS at-rules
@container,@layer, and@scopewere not processed correctly.Fixed an issue where
ContentBlockTarget.getCharLength()could return the wrong length.Fixed an issue where element vertical padding sometimes caused vertical overflow scroll in reflowable EPUBs.
Fixed an issue where pages ending with
<br>elements somtimes caused vertical overflow scroll in reflowable EPUBs.
4.3.1 (2025-06-04)
Improvements
Fixed an issue with how SwiftSoup was referenced by the ColibrioFramework, causing duplicate symbol warnings.
Changed the minimum iOS version to 12. There is no longer any special
-ios12release of the framework.
4.3.0 (2025-05-08)
iOS 12 compatible version: 4.3.0-ios12
New features
Added support for dividing AudioTimelines into sections when using the native
ColibrioAudioPlayerfor playback. This allows you to customize how Audio playback progress is shown in your app and in Now Playing. You can for example show progress per chapter instead of the whole publication. SeeMediaSessionTimelineModefor more information.Added the new option
activeElementStylesOverridetoEpubReaderPublicationOptions.mediaOverlayOptions. It allows you to override the CSS for the active element when playing EPUB MediaOverlays, without being affected bypublicationStyleOptionssuch aspaletteOptions.Added a new option
PdfReaderPublicationOptions.addColibrioSpecificFragmentSelectorData. Setting it to true will add a new Colibrio specific parameter,colibrio-pagerects, to the Locator’s selector. This allows the selector to represent multiple rectangles. This is useful when adding text selection highlights for example.
Deprecations
The following methods have been deprecated. They will be removed in the next major version of the framework.
Deprecated
ColibrioAudioPlayer.setMediaSessionMetadata(mediaSessionMetadata:). UseColibrioAudioPlayer.mediaSession.metadatainstead.Deprecated
ColibrioAudioPlayer.setMediaCommands(mediaCommands:). UseColibrioAudioPlayer.mediaSession.mediaCommandsinstead.
Bugfixes
Fixed an issue where
PublicationStyleOptions.fontSizeScaleFactorhad no effect in some reflowable EPUBs.Fixed an issue where
EpubReflowPluginOptions.customForcedPageBreakonly worked if all its options was specified.
Improvements
Setting the option
PublicationStyleOptions.removePublicationDefinedHorizontalPageMarginsto true, will now apply margin removal on more publications where it previously bailed out.Adds
tabindex="0"to overflow scroll elements so that they can be scrolled with the keyboard as required by WCAG.Added
tabindex="0"to<iframe>elements to allow keyboard navigation to focusable elements inside the iframe in Safari.Added the new property
mediaSession: ColibrioMediaSessionto theColibrioAudioPlayer. It allows you to configure which playback controls are available and how metadata information is presented in Now Playing.
4.2.1 (2025-04-07)
iOS 12 compatible version: 4.2.1-ios12
Bugfixes
Fixed an issue introduced in version
4.2.0wherePublicationStyleOptions.fontSizeScaleFactorhad no effect in some EPUBs.
4.2.0 (2025-03-26)
iOS 12 compatible version: 4.2.0-ios12
New features
Added a new method
setContentSelection(locator:completion:)toVisiblePage.Added new options,
typographyResetOptions.removePublicationDefinedFontSizesandtypographyResetOptions.removePublicationDefinedLineHeightstoIPublicationStyleOptions.Added a new method
PublicationStyleFontFace.fromAssetUrl(family:fontStretch:fontStyle:fontWeight:mediaType:assetUrl:)which allows you to load font files from any bundle used in your app.
Bugfixes
Fixed an issue where paragraph text indendation was sometimes applied on fragmented paragraphs.
Fixed an issue where page content with negative margins could appear outside of the page if
PublicationStyleOptions.removePublicationDefinedHorizontalPageMarginswas true.
Improvements
Fixed the event order when navigating in the
SingleDocumentScrollRendererto make it more consistent with how the other renderers work. The listener methodOnReadingPositionChangedListener.onReadingPositionChanged(readingPosition:)will be called beforeOnNavigationStateChangedListener.onNavigationEnded(event:)is called.
4.1.0 (2025-02-28)
iOS 12 compatible version: 4.1.0-ios12
New features
Added a new option
publicationStyleOptions.removePublicationDefinedHorizontalPageMargins. When enabled, it does a best effort try to remove page margins defined in the publication CSS.Added a new method,
ReaderPublicationNavigation.getNavigationItemById(_:).Added an async variant for the createAudioPlayer method:
AudioReadingSystemEngine.createAudioPlayer(colibrioAudioPlayerConfig:)
Bugfixes
Fixed a bug where
OnSelectionChangedListener.onSelectionChangedwasn’t called ifReaderView.scriptedContentDocumentEventHandlersEnabledhad been set to false.Fixed a bug where CSS background images did not load if the selector for the style rule contained
:beforeof:afterpseudo selectors.Fixed a bug where
ContentPositionTimeline.serializedDatacould be different between two identicalContentPositionTimelineinstances.Fixed a bug where
VisiblePage.boundingClientRectdid not update when activeTransform changed, such as while zooming and panning.
Improvements
Improved building TTS SyncMediaTimeline performance.
4.0.0 (2025-02-04) - Changes since 3.12.0
iOS 12 compatible version: 4.0.0-ios12
Overview
We are excited to announce native audiobook support.
This version of the framework enables you to load EPUBs with Media Overlays in audio-only mode, with the flexibility to synchronize with the ReaderView at any time. It also supports playback of W3C Audiobooks, whether zipped as an LPF package or "un-packaged" for streaming over HTTP. Additional format support will be added in future releases.
Check out the AudioReadingSystemEngine API documentation for how to configure your app to use the new audio playback capability. Sample applications will be available soon.
Major new features
New
AudioReadingSystemEngineandColibrioAudioPlayerclass that handles playback of audio using theAVFoundationlibrary.Support for audio playback of W3C Audiobooks and EPUB with Media Overlays.
Background audio playback support.
Integration with
MPRemoteCommandCenterandMPNowPlayingInfoCenter. Provides playback control from the Notification Center and Now Playing on connected devices.
Document Sectioning for reflowable EPUB content-documents. When enabled, reflowable documents can be split into sections prior to reflowing. This can greatly increase performance for publications with long content documents. You can control where and how often these breaks occur using options of course. We recommend that you enable Document Sectioning as a default.
New mitigation options for horizontally overflowing
tableandmathelements let you wrap these elements in scroll containers. Previously these would have been shrunken to fit the page width, affecting legibility and accessibility. Note that we have changed the default behaviour to scroll instead of shrink. Read more in the Breaking Changes section below.The Content Block API is now available. This new API provides programmatic access to a simplified representation of a publication's structure, such as the HTML elements in an EPUB. This flexible API is used internally for features like
ReaderDocumentSearchandTtsSyncMediaTimeline.
New features
Added the new option
EpubContentProcessingOptions.horizontalOverflowMitigationMinFontSize. When a word is too wide to fit on the page, it can either be broken into multiple lines or scaled down. This option sets the minimum font size to scale down to. If scaling is not enough to fit the word, the styleoverflow-wrap: break-word;will also be applied, allowing the word to be broken up over more than one line.Added the new option
EpubContentProcessingOptions.horizontalOverflowMathMLStrategycontrolling if<math>elements too wide to fit in the page should be scaled down to fit, or horizontally scrollable.Added the new option
EpubContentProcessingOptions.horizontalOverflowTableStrategycontrolling if table elements too wide to fit in the page should be scaled down to fit, or horizontally scrollable.Added the new option
EpubContentProcessingOptions.verticalOverflowMitigationStrategycontrolling if a reflowed page should be allowed to vertically scroll if all content does not fit.Added the new option
EpubReflowOptions.removeBottomMarginsOnFragmentedElementscontrolling if the bottom margin on fragmented elements should be removed or kept.Added support for iframes added by scripts in content documents.
Added a new option
TextSearchQueryOptions.ignoreDiacritics, allowing searches to match text with or without diacritics.Added
PdfReaderPublicationOptions.textLayerOptions.customCss, which allows injecting custom CSS into the text layer of PDF pages.Added two new options:
EpubReaderPublicationOptions.allowAudioElementAutoplayandEpubReaderPublicationOptions.allowVideoElementAutoplay.Added
ReaderViewAnnotationLayer.refreshAnnotations(), allowing annotations to be refreshed programmatically.Introduced
OnClipboardEventListener, with theonCopyevent firing when a user copies content from a publication to their clipboard. UseReaderView.addOnClipboardEventListenerto receive this event.Added
ReaderDocument.fetchLocatorForEntireDocument().The following options in
ReaderViewAnnotationOptionsnow supports space-separated class names:containerClassNamepositionClassNamerangeClassName
Added the new option
PublicationStyleOptions.wordSpacing, allowing modification of word spacing in reflowable EPUB documents.Added the new option
PublicationStyleOptions.letterSpacing, allowing modification of letter spacing in reflowable EPUB documents.SpreadSwipeRenderernow supports switching from two-page spreads to a single centered page when the EPUB author has configured the document withrendition:page-spread-centerorspread-none.Added the new option
ReaderViewOptions.contentDisplayAreaOptions, controlling how the available display area is utilized by publication content.Added
ContentPositionTimeline.fetchTimelinePositions(locators:)andContentPositionTimeline.fetchTimelinePositionsForNavigationItems(navigationItems:)which can be used to fetch multiple positions in one call.Added
EpubReaderPublication.readerPublicationStorage.You can now manage ReaderPublication's storage state, such aslocalStorageandsessionStoragefor scripted EPUB content documents. UseEpubReaderPublication.readerPublicationStorage.getStorageArea()to get aReaderPublicationStorageAreathat can be used for adding, updating and removing items from storages.
Breaking changes
Changed the minimum iOS version to 13. An alternate framework build supporting iOS 12 will be provided for all upcoming 4.x.x versions of the iOS framework, with the version suffix
-ios12.ResourceProviderinterface changes:Introduced new
baseUrlpropertyfetchandfetchMetadatanow takes a URL instead of a path.Error handling updated to distinguish between recoverable and non-recoverable errors.
ReaderView.visiblePagesnow returns[VisiblePage]instead of[VisiblePageData].ContentLocation.fetchNavigationItemReferences(options:completion:)callback is now called withFetchNavigationItemReferencesResultinstead ofFetchNavigationItemReferencesResultData. Properties inFetchNavigationItemReferencesResultreturn[ReaderPublicationNavigationItemReference]instead of[ReaderPublicationNavigationItemReferenceData].Removed deprecated
ColibrioTtsSynthesizerDelegate.The new options
EpubReflowOptions.removeBottomMarginsOnFragmentedElementsandEpubReflowOptions.removeTopMarginsOnFragmentedElementsdefault to true. This may cause content to appear closer to the top and bottom edge of the page compared to previous Colibrio Reader Framework versions. Set these options to false to keep the old behavior.The new options
EpubContentProcessingOptions.horizontalOverflowMathMLStrategyandEpubContentProcessingOptions.horizontalOverflowTableStrategydefault toEpubContentOverflowStrategy.SCROLLin order to improve legibility and accessibility. This will introduce horizontal scrolling within the page when the table or math elements do not fit horizontally. Set this option toEpubContentOverflowStrategy.SCALEto keep the old behavior.The new option
EpubContentProcessingOptions.horizontalOverflowMitigationMinFontSizedefaults to 16 pixels in order to improve accessibility. This may cause long words be broken up over more than one line. Set this option to 0 to keep the old behavior.The new option
EpubContentProcessingOptions.verticalOverflowMitigationStrategydefaults toEpubContentOverflowStrategy.SCROLLin order to improve accessibility. This will introduce vertical scrolling within a page if not all content fits. Set this option toEpubContentOverflowStrategy.SCALEto keep the old behavior.In
ReaderViewOptions,forcePageAspectRatioanddefaultPageAspectRatiohave been removed. UseReaderViewOptions.contentDisplayAreaOptionsinstead.
Deprecations
The following methods and properties have been deprecated. They will continue to work in all 4.x.x versions of the framework, but will be removed in the next major version update.
ColibrioViewhas been deprecated, please useColibrioReadingSystemViewinstead.ReaderPublicationNavigationDatais deprecated. Replaced byReaderPublicationNavigation.ReaderPublicationNavigationCollectionDatais deprecated. Replaced byReaderPublicationNavigationCollection.ReaderPublicationNavigationItemDatais deprecated. Replaced byReaderPublicationNavigationItem.Locator in
ReaderPublicationNavigationItemis deprecated. Added methods usingReaderPublicationNavigationItem.VisiblePageDatais deprecated. Replaced byVisiblePage.ReaderView.fetchRectsForVisibleContentis deprecated. Replaced byVisiblePage.fetchRectsForVisibleContent.Setter for
ReaderView.syncMediaPlayeris deprecated. UsesetSyncMediaPlayer(syncMediaPlayer:initialSyncMethod:)instead.SyncMediaPlayer.playingis deprecated. Use!paused && readyinstead.SyncMediaPlayer.approximateElapsedTimeis deprecated. Replaced bySyncMediaPlayer.approximateElapsedTimeMs.FetchNavigationItemReferencesResultDatais deprecated. Replaced byFetchNavigationItemReferencesResult.ReaderPublicationNavigationItemReferenceDatais deprecated. Replaced byReaderPublicationNavigationItemReference.The error used in
ResourceProvider.fetch,ResourceProvider.fetchMetadata,ResourceResponse.asBytesandResourceResponse.asStreamchanged fromResourceProviderErrortoError.The renderer option
ignoreAspectRatiohas been deprecated. It will continue to work until its removal in version5.0.0of the framework. Please useReaderViewOptions.contentDisplayAreaOptionswithtypeset toFILLinstead.ReadingSystemEngine.createZipResourceProvider(dataSource:options:)is now deprecated. UseZipResourceProvider.create(dataSource:zipResourceProviderOptions)instead.ZipResourceProvider.create(dataSource:serializedZipArchiveInformation:chunkCacheSize:completion:)is now deprecated. UseZipResourceProvider.create(dataSource:zipResourceProviderOptions)instead.
Bug fixes
Fixed an issue that sometimes caused
OnVisibleContentChangedListener.onVisiblePagesChangedto not be called.Fixed an issue where
publicationHashSignaturewas calculated differently compared to the Web framework.Improvements and bugfixes when applying page-breaks inside tables.
Fixed an issue where the reflow engine would fail to properly measure elements that had a transform applied to them, causing inaccurate page-breaks.
Fixed an issue where page-breaks were not applied correctly for pre-formatted text, like code examples.
Fixed an issue where reflow engine did not calculate margin-collapse rules correctly.
Fixed Reflow Engine issues that in some cases caused page breaks to be applied at wrong positions.
Annotation’s rendered positions now updates correctly inside scrolling containers.
Fixed issues that could cause images to get incorrect aspect ratios.
Fixed a bug where reading position might not be accurate when navigating to an annotation spanning two pages.
Fixed a bug where the “keydown” engine event’s
modifiers.shiftwas false, even if shift was pressed.Fixed an issue where VoiceOver could move focus into offscreen/hidden content on iOS 18.
Fixed an issue where TTS playback could not be resumed after being paused due to an interruption from the system.
ContentLocation.contentResolvermethods now works correctly for ranges spanning multiple EPUB documents.ContentLocation.fetchNavigationItemReferences(options:)now functions correctly for locator ranges spanning multiple EPUB documents.Fixed a memory leak issue in the Web framework running inside the WebView.
Fixed an issue where the async function
Publication.fetchContentLocation(navigationItem:)did not run on the main thread.Fixed potential task continuation leaks.
Fixed issue with
FileRandomAccessDataSourcethat in some rare cases failed to open files.Fixed crash when the
encryption.xmlfile in EPUBs contained duplicate encryption entries.Fixed an issue where EPUBs missing the unique-identifier in the OPF file could not be loaded.
Fixed an issue where
ReaderView.visiblePagessometimes did not update correctly.
Improvements
Added
ColibrioErroras base for all errors thrown by the ColibrioFramework.SpreadSwipeRendererandSinglePageSwipeRendererare now able to use all available display area when displaying publications containing fixed-layout documents with varying dimensions, such as mixed portrait and landscape documents.ContentPositionTimelinemethods are now many times faster.Updated PDF.js to version 4.8.73.
4.0.0 (2025-02-04) - Changes since 4.0.0-rc.5
iOS 12 compatible version: 4.0.0-ios12
New features
Added
ContentPositionTimeline.fetchTimelinePositions(locators:)andContentPositionTimeline.fetchTimelinePositionsForNavigationItems(navigationItems:)Added
ColibrioAudioPlayer.setNowPlayingInfoEnabled(enabled:)andColibrioAudioPlayerConfig.nowPlayingInfoEnabledAdded
EpubReaderPublication.readerPublicationStorage.You can now manage ReaderPublication's storage state, such aslocalStorageandsessionStoragefor scripted EPUB content documents. UseEpubReaderPublication.readerPublicationStorage.getStorageArea()to get aReaderPublicationStorageAreathat can be used for adding, updating and removing items from storages.Loading audiobooks with a
ZipResourceProviderdoes not require theReadingSystemEngineanymore. You can now create aZipResourceProviderusingZipResourceProvider.create(dataSource:zipResourceProviderOptions:).
Deprecations
ReadingSystemEngine.createZipResourceProvider(dataSource:options:)is now deprecated. UseZipResourceProvider.create(dataSource:zipResourceProviderOptions)instead.ZipResourceProvider.create(dataSource:serializedZipArchiveInformation:chunkCacheSize:completion:)is now deprecated. UseZipResourceProvider.create(dataSource:zipResourceProviderOptions)instead.
Bugfixes
Fixed issues where synchronization didn’t work in some books.
Fixed issue where the reported elapsed time sometimes were incorrect.
Fixed issue with
FileRandomAccessDataSourcethat in some rare cases failed to open files.Fixed crash when the
encryption.xmlfile in EPUBs contained duplicate encryption entries.Fixed an issue where EPUBs missing the unique-identifier in the OPF file could not be loaded.
Fixed issue with handling audio session activation.
Fixed issue related to AirPlay Handoff behaviour.
Fixed an issue where
ReaderView.visiblePagessometimes did not update correctly.
Improvements
ContentPositionTimelinemethods are now many times faster.Updated PDF.js to version 4.8.73.
4.0.0-rc.5 (2024-11-19)
iOS 12 compatible version: 4.0.0-rc.5-ios12
Breaking changes
In
ReaderViewOptions,forcePageAspectRatioanddefaultPageAspectRatiohave been removed. UseReaderViewOptions.contentDisplayAreaOptionsinstead.ContentLocation.fetchContentBlockTargetsreturns a list ofContentBlockTargetnow instead of a list ofContentBlockTargetData.ContentBlockTargetallows you direct access to the targetContentBlock.
Deprecations
The renderer option
ignoreAspectRatiohas been deprecated. It will continue to work until its removal in version5.0.0of the framework. Please useReaderViewOptions.contentDisplayAreaOptionswithtypeset toFILLinstead.
Improvements
SpreadSwipeRendererandSinglePageSwipeRendererare now able to use all available display area when displaying publications containing fixed-layout documents with varying dimensions, such as mixed portrait and landscape documents.
New features
Added the new option
PublicationStyleOptions.wordSpacing, allowing modification of word spacing in reflowable EPUB documents.Added the new option
PublicationStyleOptions.letterSpacing, allowing modification of letter spacing in reflowable EPUB documents.SpreadSwipeRenderernow supports switching from two-page spreads to a single centered page when the EPUB author has configured the document withrendition:page-spread-centerorspread-none.Added the new option
ReaderViewOptions.contentDisplayAreaOptions, controlling how the available display area is utilized by publication content.
Bugfixes
ContentLocation.fetchNavigationItemReferences(options:)now functions correctly for locator ranges spanning multiple EPUB documents.Fixed a memory leak issue in the Web framework running inside the WebView.
Fixed an issue where the async function
Publication.fetchContentLocation(navigationItem:)did not run on the main thread.Fixed potential task continuation leaks.
4.0.0-rc.4 (2024-10-17)
iOS 12 compatible version: 4.0.0-rc.4-ios12
New features
Added
ReaderDocument.fetchLocatorForEntireDocument().The following options in
ReaderViewAnnotationOptionsnow supports space-separated class names:containerClassNamepositionClassNamerangeClassName
Bugfixes
Fixed an issue introduced in 4.0.0-rc.2 where several ContentLocation methods returned incorrect results.
Fixed an issue where TTS playback could not be resumed after being paused due to an interruption from the system.
ContentLocation.contentResolvermethods now works correctly for ranges spanning multiple EPUB documents.
4.0.0-rc.3 (2024-10-11)
iOS 12 compatible version: 4.0.0-rc.3-ios12
Major New Features
The Content Block API is now available. This new API provides programmatic access to a simplified representation of a publication's structure, such as the HTML elements in an EPUB. This flexible API is used internally for features like
ReaderDocumentSearchandTtsSyncMediaTimeline.
Breaking Changes
Changed the minimum iOS version to 13. An alternate framework build supporting iOS 12 will be provided for all upcoming 4.x.x versions of the iOS framework, with the version suffix
-ios12.
New Features
Added a new option
TextSearchQueryOptions.ignoreDiacritics, allowing searches to match text with or without diacritics.Added
PdfReaderPublicationOptions.textLayerOptions.customCss, which allows injecting custom CSS into the text layer of PDF pages.Added two new options:
EpubReaderPublicationOptions.allowAudioElementAutoplayandEpubReaderPublicationOptions.allowVideoElementAutoplay.Added
ReaderViewAnnotationLayer.refreshAnnotations(), allowing annotations to be refreshed programmatically.Introduced
OnClipboardEventListener, with theonCopyevent firing when a user copies content from a publication to their clipboard. UseReaderView.addOnClipboardEventListenerto receive this event.
Bug Fixes
Fixed a bug where the “keydown” engine event’s
modifiers.shiftwas false, even if shift was pressed.Fixed an issue where VoiceOver could move focus into offscreen/hidden content on iOS 18.
4.0.0-rc.2 (2024-08-29)
These release notes describes the changes since version 3.11.0
Overview
We are excited to announce native audiobook support.
This version of the framework enables you to load EPUBs with Media Overlays in audio-only mode, with the flexibility to synchronize with the ReaderView at any time. It also supports playback of W3C Audiobooks, whether zipped as an LPF package or "un-packaged" for streaming over HTTP. Additional format support will be added in future releases.
Check out the AudioReadingSystemEngine API documentation for how to configure your app to use the new audio playback capability. Sample applications will be available soon.
Major new features
New
AudioReadingSystemEngineandColibrioAudioPlayerclass that handles playback of audio using theAVFoundationlibrary.Support for audio playback of W3C Audiobooks and EPUB with Media Overlays.
Background audio playback support.
Integration with
MPRemoteCommandCenterandMPNowPlayingInfoCenter. Provides playback control from the Notification Center and Now Playing on connected devices.
Document Sectioning for reflowable EPUB content-documents. When enabled, reflowable documents can be split into sections prior to reflowing. This can greatly increase performance for publications with long content documents. You can control where and how often these breaks occur using options of course. We recommend that you enable Document Sectioning as a default.
New mitigation options for horizontally overflowing
tableandmathelements let you wrap these elements in scroll containers. Previously these would have been shrunken to fit the page width, affecting legibility and accessibility. Note that we have changed the default behaviour to scroll instead of shrink. Read more in the Breaking Changes section below.
New features
Added the new option
EpubContentProcessingOptions.horizontalOverflowMitigationMinFontSize. When a word is too wide to fit on the page, it can either be broken into multiple lines or scaled down. This option sets the minimum font size to scale down to. If scaling is not enough to fit the word, the styleoverflow-wrap: break-word;will also be applied, allowing the word to be broken up over more than one line.Added the new option
EpubContentProcessingOptions.horizontalOverflowMathMLStrategycontrolling if<math>elements too wide to fit in the page should be scaled down to fit, or horizontally scrollable.Added the new option
EpubContentProcessingOptions.horizontalOverflowTableStrategycontrolling if table elements too wide to fit in the page should be scaled down to fit, or horizontally scrollable.Added the new option
EpubContentProcessingOptions.verticalOverflowMitigationStrategycontrolling if a reflowed page should be allowed to vertically scroll if all content does not fit.Added the new option
EpubReflowOptions.removeBottomMarginsOnFragmentedElementscontrolling if the bottom margin on fragmented elements should be removed or kept.Added support for iframes added by scripts in content documents.
Breaking changes
Changed minimum iOS version to 12
ResourceProviderinterface changes:Introduced new
baseUrlpropertyfetchandfetchMetadatanow takes a URL instead of a path.Error handling updated to distinguish between recoverable and non-recoverable errors.
ReaderView.visiblePagesnow returns[VisiblePage]instead of[VisiblePageData].ContentLocation.fetchNavigationItemReferences(options:completion:)callback is now called withFetchNavigationItemReferencesResultinstead ofFetchNavigationItemReferencesResultData. Properties inFetchNavigationItemReferencesResultreturn[ReaderPublicationNavigationItemReference]instead of[ReaderPublicationNavigationItemReferenceData].Removed deprecated
ColibrioTtsSynthesizerDelegate.The new options
EpubReflowOptions.removeBottomMarginsOnFragmentedElementsandEpubReflowOptions.removeTopMarginsOnFragmentedElementsdefault to true. This may cause content to appear closer to the top and bottom edge of the page compared to previous Colibrio Reader Framework versions. Set these options to false to keep the old behavior.The new options
EpubContentProcessingOptions.horizontalOverflowMathMLStrategyandEpubContentProcessingOptions.horizontalOverflowTableStrategydefault toEpubContentOverflowStrategy.SCROLLin order to improve legibility and accessibility. This will introduce horizontal scrolling within the page when the table or math elements do not fit horizontally. Set this option toEpubContentOverflowStrategy.SCALEto keep the old behavior.The new option
EpubContentProcessingOptions.horizontalOverflowMitigationMinFontSizedefaults to 16 pixels in order to improve accessibility. This may cause long words be broken up over more than one line. Set this option to 0 to keep the old behavior.The new option
EpubContentProcessingOptions.verticalOverflowMitigationStrategydefaults toEpubContentOverflowStrategy.SCROLLin order to improve accessibility. This will introduce vertical scrolling within a page if not all content fits. Set this option toEpubContentOverflowStrategy.SCALEto keep the old behavior.
Deprecations
The following methods and properties have been deprecated. They will continue to work in all 4.x.x versions of the framework, but will be removed in the next major version update.
ColibrioViewhas been deprecated, please useColibrioReadingSystemViewinstead.ReaderPublicationNavigationDatais deprecated. Replaced byReaderPublicationNavigation.ReaderPublicationNavigationCollectionDatais deprecated. Replaced byReaderPublicationNavigationCollection.ReaderPublicationNavigationItemDatais deprecated. Replaced byReaderPublicationNavigationItem.Locator in
ReaderPublicationNavigationItemis deprecated. Added methods usingReaderPublicationNavigationItem.VisiblePageDatais deprecated. Replaced byVisiblePage.ReaderView.fetchRectsForVisibleContentis deprecated. Replaced byVisiblePage.fetchRectsForVisibleContent.Setter for
ReaderView.syncMediaPlayeris deprecated. UsesetSyncMediaPlayer(SyncMediaPlayer, SyncMediaReaderViewSynchronizationMethod)instead.SyncMediaPlayer.playingis deprecated. Use!paused && readyinstead.SyncMediaPlayer.approximateElapsedTimeis deprecated. Replaced bySyncMediaPlayer.approximateElapsedTimeMs.FetchNavigationItemReferencesResultDatais deprecated. Replaced byFetchNavigationItemReferencesResult.ReaderPublicationNavigationItemReferenceDatais deprecated. Replaced byReaderPublicationNavigationItemReference.The error used in
ResourceProvider.fetch,ResourceProvider.fetchMetadata,ResourceResponse.asBytesandResourceResponse.asStreamchanged fromResourceProviderErrortoError.
Bug fixes
Fixed an issue that sometimes caused
OnVisibleContentChangedListener.onVisiblePagesChangedto not be called.Fixed an issue where
publicationHashSignaturewas calculated differently compared to the Web framework.Improvements and bugfixes when applying page-breaks inside tables.
Fixed an issue where the reflow engine would fail to properly measure elements that had a transform applied to them, causing inaccurate page-breaks.
Fixed an issue where page-breaks were not applied correctly for pre-formatted text, like code examples.
Fixed an issue where reflow engine did not calculate margin-collapse rules correctly.
Fixed Reflow Engine issues that in some cases caused page breaks to be applied at wrong positions.
Annotation’s rendered positions now updates correctly inside scrolling containers.
Fixed issues that could cause images to get incorrect aspect ratios.
Fixed a bug where reading position might not be accurate when navigating to an annotation spanning two pages.
Changes from 4.0.0-experimental.3
Renamed
ColibrioMediaServicetoAudioReadingSystemEngine.LPF and EPUB Media Overlay “audio-only” publications are now loaded from the
AudioReadingSystemEngine.Added option to skip to next/previous segment in the command center
Added
ColibrioAudioPlayer.reloadfunction which allows you to recover from an error state and retry without losing playback position.Fixed issue with incorrect playback position when moving to next segment in synced mode.
Improvements
Fixed errors string representation.
Added
ColibrioErroras base for all errors thrown by the ColibrioFramework.