-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
PSPDFKit
committed
Mar 22, 2024
1 parent
05b38da
commit 12e4d5b
Showing
66 changed files
with
1,637 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 1 addition & 21 deletions
22
android/src/main/java/com/pspdfkit/flutter/pspdfkit/FlutterPdfUiFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,14 @@ | ||
package com.pspdfkit.flutter.pspdfkit | ||
|
||
import com.pspdfkit.annotations.measurements.MeasurementPrecision | ||
import com.pspdfkit.annotations.measurements.Scale | ||
import com.pspdfkit.document.PdfDocument | ||
import com.pspdfkit.flutter.pspdfkit.util.MeasurementHelper | ||
import com.pspdfkit.ui.PdfUiFragment | ||
|
||
class FlutterPdfUiFragment : PdfUiFragment() { | ||
|
||
private var scale: Scale? = null | ||
private var precision: MeasurementPrecision? = null | ||
|
||
override fun onDocumentLoaded(document: PdfDocument) { | ||
super.onDocumentLoaded(document) | ||
// Notify the Flutter PSPDFKit plugin that the document has been loaded. | ||
EventDispatcher.getInstance().notifyDocumentLoaded(document) | ||
// We can register interest in newly created annotations so we can easily pick up measurement information. | ||
if (scale != null) { | ||
document.measurementScale = scale | ||
} | ||
if (precision != null) { | ||
document.measurementPrecision = precision | ||
} | ||
} | ||
|
||
fun setMeasurementScale(scale: Scale?) { | ||
this.scale = scale | ||
} | ||
|
||
fun setMeasurementPrecision(precision: MeasurementPrecision?) { | ||
this.precision = precision | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.