Skip to content

Commit

Permalink
Merge pull request #672 from MananGadhiyaSureshbhai/master
Browse files Browse the repository at this point in the history
Fix Show Blank PDF
  • Loading branch information
wonday authored Jul 30, 2022
2 parents ce7c506 + fdb501e commit 05e75f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/RCTPdf/RCTPdfView.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ - (void)didSetProps:(NSArray<NSString *> *)changedProps
_pdfDocument = [[PDFDocument alloc] initWithData:blobData];
}
} else {

// decode file path
_path = (__bridge_transfer NSString *)CFURLCreateStringByReplacingPercentEscapes(NULL, (CFStringRef)_path, CFSTR(""));
NSURL *fileURL = [NSURL fileURLWithPath:_path];
_pdfDocument = [[PDFDocument alloc] initWithURL:fileURL];
}
Expand Down

0 comments on commit 05e75f1

Please sign in to comment.