You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed instructions in documentation written for my React-PDF version
I have checked if this bug is not already reported
I have checked if an issue is not listed in Known issues
If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
Currently we are using react-pdf with 5.0.0 and we are getting the data with Uint8Array Binary Data. But after upgrading the version to 7.7.3 the PDF loading stopped and we are facing error as PDF Not found. Below is the code which we are using previously. Please help to resolve this ASAP or is it a known issue.
public render(): JSX.Element {
// const { ContractFileExtension } = this.props;
const { pdfLoaded } = this.state;
return (
<div style={{ height: document.body.offsetHeight }}>
{this.props.ContractFile != null && (
<Document
file={{ data: this.props.ContractFile }}
onLoadSuccess={(pdf: IReactPdf): void => {
if (!pdfLoaded) {
this.setState({ pdfPageCount: pdf.numPages, pdfLoaded: true });
}
}}
onLoadError={this.onDocumentLoadError}
>
{this.generatePages()}
</Document>
)}
{this.props.ContractFile == null && !this.state.loadError && !this.props.findDocumentError && (
<LargeCustomShimmer />
)}
{(this.state.loadError || this.props.findDocumentError) && (
<Icon style={{ fontSize: '160px' }} iconName="DocumentSearch" />
)}
{/*ContractFileExtension !== 'pdf' && (
<>
<h5>Only PDF preview is available at this time.</h5>
<Icon style={{ fontSize: '160px' }} iconName="WordDocument" />
</>
)*/}
{this.props.findDocumentError && <p>You do not have permission to view the document.</p>}
</div>
);
}
}
Steps to reproduce
Update the version from 5.0.0 to 7.7.3 where we can see this issue
Expected behavior
Need to load the PDF with version 7.7.3
Actual behavior
Throwing error as No PDF Found
Additional information
No response
Environment
Browser (if applicable):
React-PDF version:
React version:
Bundler name and version (if applicable):
The text was updated successfully, but these errors were encountered:
Before you start - checklist
Description
Currently we are using react-pdf with 5.0.0 and we are getting the data with Uint8Array Binary Data. But after upgrading the version to 7.7.3 the PDF loading stopped and we are facing error as PDF Not found. Below is the code which we are using previously. Please help to resolve this ASAP or is it a known issue.
}
Steps to reproduce
Update the version from 5.0.0 to 7.7.3 where we can see this issue
Expected behavior
Need to load the PDF with version 7.7.3
Actual behavior
Throwing error as No PDF Found
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: