@june24/expo-pdf-reader 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/ExpoPdfReaderView.swift +14 -2
- package/package.json +1 -1
|
@@ -662,12 +662,18 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
|
|
|
662
662
|
print(" Bounds: \(pathBounds)")
|
|
663
663
|
print(" Paths count: \(annotation.paths?.count ?? 0)")
|
|
664
664
|
|
|
665
|
+
// Make sure annotation is visible
|
|
666
|
+
annotation.shouldDisplay = true
|
|
667
|
+
annotation.shouldPrint = true
|
|
668
|
+
|
|
665
669
|
page.addAnnotation(annotation)
|
|
666
670
|
|
|
667
671
|
print(" Total annotations on page: \(page.annotations.count)")
|
|
668
672
|
|
|
669
|
-
// Force PDF view
|
|
673
|
+
// Force comprehensive PDF view update
|
|
674
|
+
pdfView.layoutDocumentView()
|
|
670
675
|
pdfView.setNeedsDisplay()
|
|
676
|
+
pdfView.currentPage?.setNeedsDisplay(pdfView.displayBox)
|
|
671
677
|
}
|
|
672
678
|
else if currentTool == "highlighter" {
|
|
673
679
|
let annotation = PDFAnnotation(bounds: pathBounds, forType: .ink, withProperties: nil)
|
|
@@ -680,12 +686,18 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
|
|
|
680
686
|
print("✅ Adding highlighter annotation to page")
|
|
681
687
|
print(" Bounds: \(pathBounds)")
|
|
682
688
|
|
|
689
|
+
// Make sure annotation is visible
|
|
690
|
+
annotation.shouldDisplay = true
|
|
691
|
+
annotation.shouldPrint = true
|
|
692
|
+
|
|
683
693
|
page.addAnnotation(annotation)
|
|
684
694
|
|
|
685
695
|
print(" Total annotations on page: \(page.annotations.count)")
|
|
686
696
|
|
|
687
|
-
// Force PDF view
|
|
697
|
+
// Force comprehensive PDF view update
|
|
698
|
+
pdfView.layoutDocumentView()
|
|
688
699
|
pdfView.setNeedsDisplay()
|
|
700
|
+
pdfView.currentPage?.setNeedsDisplay(pdfView.displayBox)
|
|
689
701
|
}
|
|
690
702
|
|
|
691
703
|
// Clear redo stack when new annotation is added
|
package/package.json
CHANGED