# PDFJs Express Plus is not working

**URL:** <https://pdfjs.community/t/pdfjs-express-plus-is-not-working/2493>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [April 6, 2023, 6:55am UTC](https://pdfjs.community/t/pdfjs-express-plus-is-not-working/2493 "2023-04-06T06:55:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhilhill19](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@nikhilhill19](https://pdfjs.community/u/nikhilhill19)\
**Post date:** [April 6, 2023, 6:55am UTC](https://pdfjs.community/t/pdfjs-express-plus-is-not-working/2493/1 "2023-04-06T06:55:05Z")

</div>

We are trying to show pdf and using annotation features but we are getting some file header exception error.  
Also if we are providing extension sepearatly then getting exception for file header not supported.

Providing code snippet :  
import React from “react”;  
import WebViewer from “@pdftron/pdfjs-express”;  
import “./styles.css”;  
export default function App() {  
const viewer = React.useRef(null);  
// if using a class, equivalent of componentDidMount

const funView = () =\> {  
WebViewer(  
{  
path: “WebViewer/lib”,  
initialDoc: “/files/demo.pdf”,  
},  
viewer.current  
).then((instance) =\> {  
// change to dark mode  
instance.UI.setTheme(“dark”);  
// remove left panel and left panel button from the DOM  
instance.UI.disableElements([“leftPanel”, “leftPanelButton”]);  
instance.Core.documentViewer.addEventListener(“documentLoaded”, () =\> {  
// add a custom annotation  
const rectangleAnnot =  
new instance.Core.Annotations.RectangleAnnotation();  
rectangleAnnot.PageNumber = 1;  
rectangleAnnot.X = 100;  
rectangleAnnot.Y = 150;  
rectangleAnnot.Width = 200;  
rectangleAnnot.Height = 50;  
instance.Core.annotationManager.addAnnotation(rectangleAnnot);  
});  
});  
};

return (

  
\<button  
onClick={() =\> {  
funView();  
}}  
\>  
View  

```
  <div style={{ height: "auto", overflowY: "auto" }}>
    {/* <div className="header">React sample.</div> */}

    <div
      className="webviewer"
      style={{ height: "51em" }}
      ref={viewer}
    ></div>
  </div>
</div>

```

);  
}

PFA, Error screenshot attached.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/7/7e4c66664b1f62a63799d7bfab4b62a9d6db4a37.png)

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [April 6, 2023, 6:50pm UTC](https://pdfjs.community/t/pdfjs-express-plus-is-not-working/2493/2 "2023-04-06T18:50:56Z")

</div>

Hello nikhilhill19,

%22 is actually a quotation mark: " in URL encoding, there could be something wrong with the string.

Can you provide a sample project to test this out? Thanks!

Best regards,  
Tyler
