68
Views
4
Comments
[Reactive Web Previewer] File preview randomly does not render the document
reactive-web-previewer
Reactive icon
Forge asset by Marcelo Ferreira
Application Type
Reactive

Hi guys. I need help. I have a PDF file that fails to render on random occasions. This is happening with all PDFs

Then renders correctly when you refresh sometimes. I am only displaying the web previewer if the data has been fetched.

2023-05-25 02-32-50
Leandro Daniel Lemos Murta

Hi @Munyaradzi Kandoro !

Had the same problem in some projects i've worked, and the solution is simple.

Basically we are talking about Reactive Webs, that can change a value and the changes replicates in the page, but in this case, an component created by third parties that renders the PDF file, probably isn't capable of knowing that your file was retrieved from the server.

So what i recommend you to do is control better the lifecycle of the situation:

First: If you are loading the file from an data action, you can put an if in the pdf component at the screen, and inside that if you will create an condition to control the exibition when the Binary is loaded. You can use "NameOfYourDataAction.IsFethed = True", or if you want make it the logic more visible on the local action, create a local variable of type boolean that will control if you data was loaded, then change the value to true using the AfterFetch on your created DataAction using the assign option.

That way the PDF component will only be rendered after the binary is available.

Hope this help you!


2024-09-12 15-12-50
Munyaradzi Kandoro

I am only @Leandro Lemos, I am only displaying the component if the data has been fetched i.e. "NameOfDataAction.IsDataFetched = True".

I am mostly experiencing this issue when I am navigating from an external application to this screen.

2022-11-02 07-18-33
Nicholas Campbell

Any response here Leandro to Munya's reply?

Anyone else?

2020-06-29 08-28-39
Marta Fonseca

Hello, I am having the exact same problem. Is there a solution already for this?

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