-
Notifications
You must be signed in to change notification settings - Fork 637
Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java b/node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java
index efde3b0..737eec9 100644
--- a/node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java
+++ b/node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java
@@ -379,6 +379,7 @@ public class PdfView extends PDFView implements OnPageChangeListener,OnLoadCompl
// page start from 1
public void setPage(int page) {
this.page = Math.max(page, 1);
+ this.jumpTo(this.page - 1); // Subtract 1 because PDFView uses 0-based page numbers
}
public void setEnableRTL(boolean enableRTL) {This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels