|
@@ -119,15 +119,15 @@ const CPDFReaderViewControllerExampleScreen = () => {
|
|
|
pickerResult.then(async (res) => {
|
|
|
const file = res[0];
|
|
|
const fileName = file?.name;
|
|
|
- if (!fileName?.endsWith('xfdf')) {
|
|
|
- console.log('ComPDFKitRN please select xfdf format file');
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
console.log('fileUri:', file?.uri);
|
|
|
console.log('fileCopyUri:', file?.fileCopyUri);
|
|
|
console.log('fileType:', file?.type);
|
|
|
const path = file!!.fileCopyUri!!
|
|
|
+ if (!path?.endsWith('xml') && !path?.endsWith('xfdf')) {
|
|
|
+ console.log('ComPDFKitRN please select xfdf format file');
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
const importResult = await pdfReaderRef.current?.importAnnotations(path);
|
|
|
console.log('ComPDFKitRN importAnnotations:', importResult);
|