16
Views
1
Comments
Solved
[PDFJSViewer] [PDFJSViewer-ODC] - Experiencing Error when viewing pdf
PDFJSViewer
Forge asset by ROKODO.IO
Application Type
Reactive

Hi, could anyone help me on how to tackle this error when viewing pdf using the forge component PDFJSViewer.
I already set it up correctly by downloading the 
PDFJSViewer (https://www.outsystems.com/forge/component-overview/18089/pdfjsviewer-odc)
and 
PDFJSViewerReactive (https://www.outsystems.com/forge/component-overview/18090/pdfjsviewerreactive-odc)
So now Im converting binary data to base64 using the BinaryToBase64 action everything is working fine. But when I click the action to preview the pdf, i am experiencing an error. upon checking in the log it says: "OS-CLRT-00000 - Cannot assign a JavaScript undefined with value undefined to an output parameter of type Integer Check the JavaScript node 'OpenPDF' of the action 'LoadPDF'."
The LoadPDF action is inside the forge component so I am sure I cannot change anything in it. And If I need to clone it, I also have no idea on how to fix it as I have little experience in working with Javascript. If anyone can help me it would be much appreciated. I attached my OML file and snippets of the error. If you are going to test, create a directory, and then upload the file to that directory so you can view it. Thank you everyone!




PDFViewer.oml
error.png
errorlog.png
devtoolerror.png
UserImage.jpg
Ryan Perez
Solution

Just for everyone who comes across this post. After days of searching, I finally found a solution!

Another forge component called Adobe PDF Embed API (https://www.outsystems.com/forge/component-overview/21525/adobe-pdf-embed-api-odc). Basically it uses Adobe Embed API to integrate with your app. Its a pretty straightforward component with minimal set up. Just follow the documentation provided. Hope this helps for anyone wanting to further their PDF Control!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.