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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmitry-blackwave
Copy link

@dmitry-blackwave dmitry-blackwave commented May 3, 2024

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: b32b4ed).
  • Create a new release (and tag) with the new package version (see https://github.com/PSPDFKit/react-native/releases).

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

Successfully merging this pull request may close these issues.

1 participant