87
Views
3
Comments
[pdfJS Viewer Reactive] How to display PDF in container
Question
pdfjs-viewer-reactive
Reactive icon
Forge asset by Eduardo Jauch

Hi All, 

I am trying to build a Ipad application . I need to show PDF in container inside my screen . I am getting PDF content (Binary Data) from rest  API .  I am using the pdfjs viewer reactive plugin.  I am getting below error.


Image



I am executing below step


1.I am calling rest api to get the Binary content of my pdf

2. I am trying to save file using File Plugin 

Then i am calling the web block of this plugin and pass the URL return by File Plugin .



Can any one help me what i am missing here

UserImage.jpg
Anjali Choudhary

Hi @Ankit Kumar Varshney ,

In URL :- Provoid the path where you store(Save) data,

And 

In AllowedHostsList :- Comma separated hosts. e.g.: apps.domain.com,appstest.domain.com,appsdev.domain.com .
or The current running domain will be auto allowed.


Thanks

UserImage.jpg
Ankit Kumar Varshney

Thanks Harshit for your reply 

But i don't have pdf under resource folder. I am getting the binary content from rest api then saving in to temp folder of my app. I am using File Plugin to save the file locally and using URL which return by saveFile method of File Plugin





UserImage.jpg
Antonio Cordeiro

Hey, was this solved? If yes how did you solve it? I'm trying to do something similar, i have the binary data of a pdf file and I want to show it inside a container in a mobile app.

Thanks in advance

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