At this point, I will believe anything I read about pdf.js. But this is lack of customization and styles. Step 3: After creating the React application, Install the react-pdf package using the following command. Your response type needs to be arraybuffer in order to create a blob out of it. Tried with first option with data: {renderPdf} which will trigger error. Original Source of this answer - Open base64 encoded pdf file using javascript. Q&A for work. // Prepare canvas using PDF page dimensions Launching the CI/CD and R Collectives and community editing features for REACT PDF: Cannot use the packages to show static PDF file, Loading PDF from Base64 data using react-pdf-js. Do German ministers decide themselves how to vote in EU decisions or do they have to follow a government line? By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Its works for my files but when I try to open a file that is bigger than the others is not working. Maybe the problem of @kakaluote444 is that the string itself was buggy. How do I return the response from an asynchronous call? How do I check if an element is hidden in jQuery? When loading a document using a URL, WebViewer will use the URL to determine what type of file it is. By the way, in addition to