-
Notifications
You must be signed in to change notification settings - Fork 60
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
May 8, 2023
1 parent
f6a1a53
commit 7e28d95
Showing
87 changed files
with
1,481 additions
and
545 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
2 changes: 1 addition & 1 deletion
2
android/src/main/java/com/pspdfkit/flutter/pspdfkit/FlutterInstantPdfActivity.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
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
34 changes: 34 additions & 0 deletions
34
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.pspdfkit.flutter.pspdfkit | ||
|
||
import com.pspdfkit.annotations.measurements.FloatPrecision | ||
import com.pspdfkit.annotations.measurements.Scale | ||
import com.pspdfkit.document.PdfDocument | ||
import com.pspdfkit.ui.PdfUiFragment | ||
|
||
class FlutterPdfUiFragment : PdfUiFragment() { | ||
|
||
private var scale: Scale? = null | ||
private var precision: FloatPrecision? = 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: FloatPrecision?) { | ||
this.precision = precision | ||
} | ||
|
||
} |
Oops, something went wrong.