react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Fixed RCTConvert+PSPDFDocument.m parseURL function to be able to handle custom remote sources.

Open dmitry-blackwave opened this issue 1 year ago • 0 comments

Details

Passing a URL to the document prop causes an error on iOS. The reason is how the parseURL function handles incoming strings. If you pass a link, the function will try to find a local resource (which is not correct) and cause an error as a result.

Dependencies

react-native: 0.72.12 react-native-pspdfkit: 2.9.1 PSPDFKit: 13.3.3 PSPDFKit/Core: 13.3.3

Steps to reproduce

    <PSPDFKitView
      document={'https://pspdfkit.com/demo/examples/document-security/prevent-pdf-print-or-download/example.pdf'}
      configuration={{
        pageTransition: 'scrollContinuous',
        scrollDirection: 'vertical',
        documentLabelEnabled: true,
      }}
      style={{flex: 1, color: '#267AD4'}}
    />

or

    PSPDFKit.present('https://pspdfkit.com/demo/examples/document-security/prevent-pdf-print-or-download/example.pdf', {
      showThumbnailBar: 'scrollable',
      enableInstantComments: true,
    });

Acceptance Criteria

  • [ ] When approved, right before merging, rebase with master and increment the package version in package.json, package-lock.json, samples/Catalog/package.json, samples/Catalog/yarn.lock, samples/NativeCatalog/package.json, and samples/NativeCatalog/yarn.lock (see example commit: https://github.com/PSPDFKit/react-native/pull/403/commits/b32b4edd97ee9b49c51c8b932e2bf477744c2b24).
  • [ ] Create a new release (and tag) with the new package version (see https://github.com/PSPDFKit/react-native/releases).

dmitry-blackwave avatar May 03 '24 08:05 dmitry-blackwave