Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repositories {
gradlePluginPortal()
google()
mavenCentral()
maven("https://jitpack.io")
}

dependencies {
Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ ksp = "2.1.21-2.0.1"

ktlint = "12.1.1"

# We cannot upgrade to 1.9.0 as it conflicts with liblcp.
# See https://github.com/readium/kotlin-toolkit/issues/29
#noinspection GradleDependency
pdfium = "1.9.8"
pdf-viewer = "3.2.8"
picasso = "2.8"
pspdfkit = "8.4.1"

Expand Down Expand Up @@ -122,6 +122,8 @@ kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime",
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" }
kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "kotlinx-collections-immutable" }

pdfium = { group = "com.github.marain87", name = "PdfiumAndroid", version.ref = "pdfium" }
pdfviewer = { group = "com.github.marain87", name = "AndroidPdfViewer", version.ref = "pdf-viewer" }
picasso = { group = "com.squareup.picasso", name = "picasso", version.ref = "picasso" }
pspdfkit = { group = "com.pspdfkit", name = "pspdfkit", version.ref ="pspdfkit" }

Expand Down
17 changes: 0 additions & 17 deletions readium/adapters/pdfium/common/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion readium/adapters/pdfium/common/gradle.properties

This file was deleted.

Binary file not shown.
3 changes: 0 additions & 3 deletions readium/adapters/pdfium/common/src/main/AndroidManifest.xml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions readium/adapters/pdfium/document/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ android {

dependencies {
api(project(":readium:readium-shared"))
implementation(project(":readium:adapters:pdfium:readium-adapter-pdfium-common"))

implementation(libs.pdfviewer)
implementation(libs.timber)
implementation(libs.kotlinx.coroutines.android)
}
4 changes: 2 additions & 2 deletions readium/adapters/pdfium/navigator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ dependencies {
api(project(":readium:readium-shared"))
api(project(":readium:readium-navigator"))
api(project(":readium:adapters:pdfium:readium-adapter-pdfium-document"))
implementation(project(":readium:adapters:pdfium:readium-adapter-pdfium-common"))
implementation(files("libs/android-pdf-viewer-2.8.2.jar"))
implementation(libs.pdfium)
implementation(libs.pdfviewer)

implementation(libs.androidx.fragment.ktx)
implementation(libs.timber)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ public class PdfiumDocumentFragment internal constructor(
// navigator.
.apply { listener?.onConfigurePdfView(this) }
.defaultPage(page)
.onRender { _, _, _ ->
.onRender {
if (settings.fit == Fit.WIDTH) {
pdfView.fitToWidth()
pdfView.fitToWidth(page)
// Using `fitToWidth` often breaks the use of `defaultPage`, so we
// need to jump manually to the target page.
pdfView.jumpTo(page, false)
Expand Down
5 changes: 1 addition & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ dependencyResolutionManagement {
mavenCentral()
maven(url = "https://s3.amazonaws.com/repo.commonsware.com")
maven(url = "https://customers.pspdfkit.com/maven")
maven(url = "https://jitpack.io")
}
}

rootProject.name = "Readium"

include(":readium:adapters:pdfium:common")
project(":readium:adapters:pdfium:common")
.name = "readium-adapter-pdfium-common"

include(":readium:adapters:pdfium:document")
project(":readium:adapters:pdfium:document")
.name = "readium-adapter-pdfium-document"
Expand Down