Skip to content

Commit

Permalink
Release 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PSPDFKit committed Mar 22, 2024
1 parent 439f544 commit c2affd4
Show file tree
Hide file tree
Showing 161 changed files with 11,042 additions and 1,849 deletions.
56 changes: 28 additions & 28 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3439,6 +3439,34 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
## zlib (http://www.zlib.net/)

zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.11, January 15th, 2017

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Jean-loup Gailly Mark Adler
[email protected] [email protected]


--------------------------------------------------------------------------------
## Pdfium (https://pdfium.googlesource.com/)

Expand Down Expand Up @@ -4060,31 +4088,3 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
## zlib (http://www.zlib.net/)

zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.11, January 15th, 2017

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Jean-loup Gailly Mark Adler
[email protected] [email protected]

18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
## Newest Release

### 2.9.0 - 22 Mar 2024

- Adds new getConfiguration method to retrieve current PSPDFKitView configuration options. (J#HYB-192)
- Adds the option to open a password protected document through configuration. (J#HYB-213)
- Adds the ability to add custom toolbar buttons to the PSPDFKit toolbar. (J#HYB-198)
- Adds support for new `MeasurementValueConfiguration` configuration option, replacing deprecated `setMeasurementScale` and `setMeasurementPrecision` methods. (J#HYB-205)
- Updates `showPageLabels` property to also control page number overlay on Android. (J#HYB-223)
- Updates for PSPDFKit 2024.1.2 for Android.
- Updates for PSPDFKit 13.3.3 for iOS.
- Fixes issue of document URIs with file:/// scheme on iOS. (#43160)
- Fixes issue where `onDocumentLoaded` callback was not called on Android. (#43187)
- Fixes signatureSavingStrategy configuration option to save signature if enabled. (J#HYB-210)
- Fixes `spreadFitting` configuration option behaviour on iOS. (J#HYB-222)

## Previous Releases

### 2.8.1 - 27 Feb 2024

- Updates for PSPDFKit 13.3.1 for iOS. (#43565)
- Removes `scrollViewInsetAdjustment`, `spreadFitting` and `allowedMenuActions` configuration options which are deprecated in PSPDFKit for iOS. (#43565)

## Previous Releases

### 2.8.0 - 18 Dec 2023

- Adds TypeScript types support to PSPDFKit plugin. (#42380)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
All items and source code Copyright © 2010-2023 PSPDFKit GmbH.
All items and source code Copyright © 2010-2024 PSPDFKit GmbH.

PSPDFKit is a commercial product and requires a license to be used.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,6 @@ For Troubleshooting common issues you might encounter when setting up PSPDFKit f
## License
This project can be used for evaluation or if you have a valid PSPDFKit license.
All items and source code Copyright © 2010-2023 PSPDFKit GmbH.
All items and source code Copyright © 2010-2024 PSPDFKit GmbH.
See [LICENSE](./LICENSE) for details.
11 changes: 9 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2021-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand All @@ -15,7 +15,7 @@
* Contains gradle configuration constants
*/
ext {
PSPDFKIT_VERSION = '8.10.0'
PSPDFKIT_VERSION = '2024.1.2'
}

buildscript {
Expand Down Expand Up @@ -70,6 +70,13 @@ dependencies {
api("com.pspdfkit:pspdfkit:${PSPDFKIT_VERSION}") {
exclude group: 'com.google.auto.value', module: 'auto-value'
}

implementation "androidx.compose.material:material:1.5.4"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
implementation "androidx.compose.foundation:foundation:1.5.4"
implementation "androidx.compose.ui:ui:1.5.4"

implementation "com.facebook.react:react-native:+"
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
~
~ PSPDFKit
~
~ Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
~ Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
~
~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved.
// Copyright © 2018-2024 PSPDFKit GmbH. All rights reserved.
//
// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down Expand Up @@ -34,7 +34,6 @@ import com.pspdfkit.annotations.configuration.SoundAnnotationConfiguration
import com.pspdfkit.annotations.configuration.StampAnnotationConfiguration
import com.pspdfkit.annotations.stamps.StampPickerItem
import com.pspdfkit.configuration.annotations.AnnotationAggregationStrategy
import com.pspdfkit.react.helper.MeasurementHelper
import com.pspdfkit.ui.fonts.Font
import com.pspdfkit.ui.inspector.views.BorderStylePreset
import com.pspdfkit.ui.special_mode.controller.AnnotationTool
Expand Down Expand Up @@ -70,8 +69,6 @@ const val MIN_TEXT_SIZE = "minimumTextSize"
const val MAX_TEXT_SIZE = "maximumTextSize"
const val DEFAULT_FONT = "defaultFont"
const val AVAILABLE_FONTS = "availableFonts"
const val DEFAULT_SCALE = "defaultScale"
const val DEFAULT_PRECISION = "defaultPrecision"

const val ANNOTATION_INK_PEN = "inkPen"
const val ANNOTATION_INK_MAGIC = "inkMagic"
Expand Down Expand Up @@ -306,16 +303,6 @@ class AnnotationConfigurationAdaptor {
)
}

DEFAULT_SCALE -> configuration.getMap(key)?.let { scaleObject ->
val scale = MeasurementHelper.getScale(scaleObject)
builder.setDefaultScale(scale)
}

DEFAULT_PRECISION -> configuration.getString(key)?.let { precisionString ->
val precision = MeasurementHelper.getPrecision(precisionString)
builder.setDefaultPrecision(precision)
}

MAX_ALPHA -> builder.setMaxAlpha(configuration.getDouble(key).toFloat())
MIN_ALPHA -> builder.setMinAlpha(configuration.getDouble(key).toFloat())
MAX_THICKNESS -> builder.setMaxThickness(configuration.getDouble(key).toFloat())
Expand Down Expand Up @@ -366,16 +353,6 @@ class AnnotationConfigurationAdaptor {
builder.setAvailableColors(extractColors(colors.toArrayList().map { it as String }))
}

DEFAULT_SCALE -> configuration.getMap(key)?.let { scaleObject ->
val scale = MeasurementHelper.getScale(scaleObject)
builder.setDefaultScale(scale)
}

DEFAULT_PRECISION -> configuration.getString(key)?.let { precisionString ->
val precision = MeasurementHelper.getPrecision(precisionString)
builder.setDefaultPrecision(precision)
}

MAX_ALPHA -> builder.setMaxAlpha(configuration.getDouble(key).toFloat())
MIN_ALPHA -> builder.setMinAlpha(configuration.getDouble(key).toFloat())
MAX_THICKNESS -> builder.setMaxThickness(configuration.getDouble(key).toFloat())
Expand Down Expand Up @@ -429,16 +406,6 @@ class AnnotationConfigurationAdaptor {
)
}

DEFAULT_SCALE -> configuration.getMap(key)?.let { scaleObject ->
val scale = MeasurementHelper.getScale(scaleObject)
builder.setDefaultScale(scale)
}

DEFAULT_PRECISION -> configuration.getString(key)?.let { precisionString ->
val precision = MeasurementHelper.getPrecision(precisionString)
builder.setDefaultPrecision(precision)
}

DEFAULT_LINE_END -> configuration.getString(key)?.let { lineEndPair ->
builder.setDefaultLineEnds(extractLineEndPair(lineEndPair))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down Expand Up @@ -325,6 +325,61 @@ public ConfigurationAdapter(@NonNull final Context context, ReadableMap configur
}
}

public static List<String> getStringValuesForConfigurationItems(final List<AnnotationType> items) {
List<String> foundKeys = new ArrayList<>();
for (AnnotationType item : items) {
foundKeys.add(item.toString());
}
return foundKeys;
}

public static String getStringValueForConfigurationItem(final Enum item) {
String resolvedValue = "";
if (item instanceof PageScrollDirection) {
if (item == PageScrollDirection.HORIZONTAL) { resolvedValue = PAGE_SCROLL_DIRECTION_HORIZONTAL; }
else if (item == PageScrollDirection.VERTICAL) { resolvedValue = PAGE_SCROLL_DIRECTION_VERTICAL; }
}

if (item instanceof PageScrollMode) {
if (item == PageScrollMode.PER_PAGE) { resolvedValue = PAGE_TRANSITION_PER_SPREAD; }
else if (item == PageScrollMode.CONTINUOUS) { resolvedValue = PAGE_TRANSITION_CONTINUOUS; }
}

if (item instanceof PageLayoutMode) {
if (item == PageLayoutMode.AUTO) { resolvedValue = PAGE_MODE_AUTO; }
else if (item == PageLayoutMode.SINGLE) { resolvedValue = PAGE_MODE_SINGLE; }
else if (item == PageLayoutMode.DOUBLE) { resolvedValue = PAGE_MODE_DOUBLE; }
}

if (item instanceof SignatureSavingStrategy) {
if (item == SignatureSavingStrategy.ALWAYS_SAVE) { resolvedValue = SIGNATURE_SAVING_STRATEGY_ALWAYS; }
else if (item == SignatureSavingStrategy.NEVER_SAVE) { resolvedValue = SIGNATURE_SAVING_STRATEGY_NEVER; }
else if (item == SignatureSavingStrategy.SAVE_IF_SELECTED) { resolvedValue = SIGNATURE_SAVING_STRATEGY_IF_SELECTED; }
}

if (item instanceof PageFitMode) {
if (item == PageFitMode.FIT_TO_SCREEN) { resolvedValue = SPREAD_FITTING_FIT; }
else if (item == PageFitMode.FIT_TO_WIDTH) { resolvedValue = SPREAD_FITTING_FILL; }
}

if (item instanceof UserInterfaceViewMode) {
if (item == UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_AUTOMATIC) { resolvedValue = USER_INTERFACE_VIEW_MODE_AUTOMATIC; }
else if (item == UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_AUTOMATIC_BORDER_PAGES) { resolvedValue = USER_INTERFACE_VIEW_MODE_AUTOMATIC_BORDER_PAGES; }
else if (item == UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_VISIBLE) { resolvedValue = USER_INTERFACE_VIEW_MODE_ALWAYS_VISIBLE; }
else if (item == UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_HIDDEN) { resolvedValue = USER_INTERFACE_VIEW_MODE_ALWAYS_HIDDEN; }
else if (item == UserInterfaceViewMode.USER_INTERFACE_VIEW_MODE_MANUAL) { resolvedValue = USER_INTERFACE_VIEW_MODE_ALWAYS_HIDDEN; }
}

if (item instanceof ThumbnailBarMode) {
if (item == ThumbnailBarMode.THUMBNAIL_BAR_MODE_FLOATING) { resolvedValue = SHOW_THUMBNAIL_BAR_FLOATING; }
else if (item == ThumbnailBarMode.THUMBNAIL_BAR_MODE_NONE) { resolvedValue = SHOW_THUMBNAIL_BAR_NONE; }
else if (item == ThumbnailBarMode.THUMBNAIL_BAR_MODE_SCROLLABLE) { resolvedValue = SHOW_THUMBNAIL_BAR_SCROLLABLE; }
else if (item == ThumbnailBarMode.THUMBNAIL_BAR_MODE_PINNED) { resolvedValue = SHOW_THUMBNAIL_BAR_PINNED; }
}

return resolvedValue;
}

private void configureShowPageNumberOverlay(final boolean showPageNumberOverlay) {
if (showPageNumberOverlay) {
configuration.showPageNumberOverlay();
Expand Down Expand Up @@ -499,8 +554,10 @@ private void configureShowAnnotationListAction(final boolean showAnnotationListA
private void configureShowPageLabels(final boolean showPageLabels) {
if (showPageLabels) {
configuration.showPageLabels();
configuration.showPageNumberOverlay();
} else {
configuration.hidePageLabels();
configuration.hidePageNumberOverlay();
}
}

Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/com/pspdfkit/react/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.pspdfkit.react;

/// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
/// Copyright © 2021-2024 PSPDFKit GmbH. All rights reserved.
///
/// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
/// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/com/pspdfkit/react/RNProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* PSPDFKit
*
* Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
Expand Down
Loading

0 comments on commit c2affd4

Please sign in to comment.