562
Views
11
Comments
Solved
[Web Previewer] Inconsistent Document Loading
Question
Forge component by Rui Mendes
20
Published on 19 Nov 2018

I am experiencing an issue where the viewer occasionally does not load a document. The viewer does not provide any errors it simply just remains blank. 

The issue is difficult to reproduce on demand as it occurs randomly.The issue also occurs for a document which successfully loads on other occasions. 

Has anyone else experienced the same issue? If so, how did you overcome it? 

I am developing in Service Studio version 11.0.408.0.

Solution

As per Marcelo's suggested solution above, I managed find the location of the in the WebPreviewer Application which would bypass the Gviewer and display PDF's directly in the iframe. 

Change the Assign Expression variable in the preparation screen to NOT prepend the following code to the iframe src expression:

https://docs.google.com/gview?embedded=true&url=

Instead, remove the prepended code resulting in the following assignment: 

mvp_badge
MVP
Rank: #15

Hi Nicholas,

I was having the same problem. Looks like docs.google.com/gview which is used has some problems and you need to keep reloading it till it works. basically i change the component a bit to stop using this and just open the file in an iframe.

Regards,

Marcelo 


Solution

As per Marcelo's suggested solution above, I managed find the location of the in the WebPreviewer Application which would bypass the Gviewer and display PDF's directly in the iframe. 

Change the Assign Expression variable in the preparation screen to NOT prepend the following code to the iframe src expression:

https://docs.google.com/gview?embedded=true&url=

Instead, remove the prepended code resulting in the following assignment: 

mvp_badge
MVP
Rank: #15

Hi,

Sry for the late response. Glad it's working for you.

Regards,

Marcelo

mvp_badge
MVP
Rank: #15

I will include here my solution if anyone else has the same problem.

Regards,

Marcelo

WebPreviewer.oml

Thanks for the example Marcelo. 

I noticed that the ability to open up a .pdf into a new tab is lost when moving to an iframe. 

The attached example has a link which displays at the bottom of the viewer when a .pdf is rendered. The link will open up a new tab and display the .pdf.

Perhaps this will assist someone else who also requires .pdf's to be opened in a new tab. 

Kind regards, 

Nicholas

WebPreviewer_PDF_Link.oml

mvp_badge
MVP
Rank: #15

Hi NIcholas,

I also have that functionality of sometimes open the file in same page , another page or even popup. But i prefer to have it outside the component. Basically I have a page with the preview. and depending on the way I open that page I have the 3 different behaviors.

Regards,

Marcelo

Rank: #38405

Hi there


Tried the same solution mentioned above , it now cannot really convert and render the file content properly in iframe . Do i have to do any other things too to make this work,


Regards

Kush

Rank: #38405

Hi there


Tried the same solution mentioned above , it now cannot really convert and render the file content properly in iframe . Do i have to do any other things too to make this work,


Regards

Kush