In PDFjs, there are two ways to load pdf files: loadFile () and renderPage (). The loadFile () method is used to load a PDF file, while the renderPage () method is used to render a single page in a PDF file. When using pdfjs, we need to call the loadFile () method to load the PDF file, and then call the renderPage () method to render each page.