Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No member named 'enableDoubleTapZoom' in 'facebook::react::RNPDFPdfViewProps' #878

Open
frannale opened this issue Oct 30, 2024 · 18 comments

Comments

@frannale
Copy link

What react-native version are you using? 0.76.1

What react-native-pdf version are you using? 6.75

What platform does your issue occur on? ios

Describe your issue as precisely as possible :

  1. Build IOS
Screenshot 2024-10-30 at 17 57 23

In migration process to RN 0.76.1 this brokes, works ok in RN 0.73.9

@dattm97
Copy link

dattm97 commented Oct 31, 2024

I have the same issue.

@HassenMab
Copy link

I'm facing the same issue RN "0.76.1"
works fine on RN "0.75.3"

@tdinckaya
Copy link

same issue

2 similar comments
@lfelipesbs
Copy link

same issue

@dizzyant
Copy link

dizzyant commented Nov 1, 2024

same issue

@scarlac
Copy link
Contributor

scarlac commented Nov 1, 2024

Please react to the original issue with 👍 instead of commenting.

@scarlac
Copy link
Contributor

scarlac commented Nov 1, 2024

As a temporary workaround, or with a patch-package fix, you may change the following line in:
node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js

   // ...
   enableAntialiasing: ?boolean,
   enableDoubleTapZoom: ?boolean, // add this line
   fitPolicy: ?Int32,
   // ...

Then re-run pod install to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file: ios/build/generated/ios/react/renderer/components/rnpdf/Props.h which should now contain:

  // ...
  bool enableAntialiasing{false};
  bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works
  int fitPolicy{0};
  // ...

@alex-mironov
Copy link

@scarlac sorry for being inpatient, but do you by chance know when can we expect the new version of package to be released with this fix?

@Abderrazzek
Copy link

Abderrazzek commented Nov 11, 2024

@scarlac Double-clicking on the PDF viewer in iOS causes the app to crash. It seems that additional fixes may be needed to apply a proper patch to the package.

@scarlac
Copy link
Contributor

scarlac commented Nov 11, 2024

@scarlac sorry for being inpatient, but do you by chance know when can we expect the new version of package to be released with this fix?

Sorry, I'm not the maintainer of this repo, so I don't know.

I had other issues while migrating so I eventually gave up, so it's possible my patch isn't sufficient, as some are indicating.

@dizzyant
Copy link

dizzyant commented Nov 12, 2024

@scarlac Double-clicking on the PDF viewer in iOS causes the app to crash. It seems that additional fixes may be needed to apply a proper patch to the package.

Commenting out line 735 in node_modules/react-native-pdf/ios/RNPDFPdf/RNPDFPdfView.mm fixed the double tap issue for me on iOS:
_onChange(@{ @"message": @"pageDoubleTap" });
to
// _onChange(@{ @"message": @"pageDoubleTap" });

This gives you the added "feature" of selecting text by a tap followed immediately by a drag. (Maybe it was already like that?)

@aokdev06 aokdev06 mentioned this issue Nov 13, 2024
@aokdev06
Copy link
Contributor

aokdev06 commented Nov 13, 2024

As a temporary workaround, or with a patch-package fix, you may change the following line in: node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js

   // ...
   enableAntialiasing: ?boolean,
   enableDoubleTapZoom: ?boolean, // add this line
   fitPolicy: ?Int32,
   // ...

Then re-run pod install to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file: ios/build/generated/ios/react/renderer/components/rnpdf/Props.h which should now contain:

  // ...
  bool enableAntialiasing{false};
  bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works
  int fitPolicy{0};
  // ...

Created pull request for fix

@vishaltanna
Copy link

As a temporary workaround, or with a patch-package fix, you may change the following line in: node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js

   // ...
   enableAntialiasing: ?boolean,
   enableDoubleTapZoom: ?boolean, // add this line
   fitPolicy: ?Int32,
   // ...

Then re-run pod install to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file: ios/build/generated/ios/react/renderer/components/rnpdf/Props.h which should now contain:

  // ...
  bool enableAntialiasing{false};
  bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works
  int fitPolicy{0};
  // ...

it's worked for me.

@shivnath17
Copy link

Is the MR getting merged anytime soon?

@varunvarshney00
Copy link

@scarlac Double-clicking on the PDF viewer in iOS causes the app to crash. It seems that additional fixes may be needed to apply a proper patch to the package.

Commenting out line 735 in node_modules/react-native-pdf/ios/RNPDFPdf/RNPDFPdfView.mm fixed the double tap issue for me on iOS: _onChange(@{ @"message": @"pageDoubleTap" }); to // _onChange(@{ @"message": @"pageDoubleTap" });

This gives you the added "feature" of selecting text by a tap followed immediately by a drag. (Maybe it was already like that?)

Thanks @dizzyant this worked for me, my app was crashing on the double tap on the pdf and this fixed it additionally i deleted the app from the emulator and re run pod install.

@varunvarshney00
Copy link

As a temporary workaround, or with a patch-package fix, you may change the following line in: node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js

   // ...
   enableAntialiasing: ?boolean,
   enableDoubleTapZoom: ?boolean, // add this line
   fitPolicy: ?Int32,
   // ...

Then re-run pod install to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file: ios/build/generated/ios/react/renderer/components/rnpdf/Props.h which should now contain:

  // ...
  bool enableAntialiasing{false};
  bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works
  int fitPolicy{0};
  // ...

Thanks bro, it worked, before doing your fix my app on ios was crashing.

@husnaintahir
Copy link

@scarlac Double-clicking on the PDF viewer in iOS causes the app to crash. It seems that additional fixes may be needed to apply a proper patch to the package.

facing the same issue, none of the above workarounds are working

@nathangabriel27
Copy link

facing the same issue, none of the above workarounds are working

Some Problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests