[Reactive Web Previewer] Preview PDF files not working
Question
Forge component by Marcelo Ferreira

Hello all! I'm trying to use the component to preview PDF files but somehow it's not working. For images, it's working fine, but for PDF I receive the message "No preview available". I'm trying to load it from the database.



Any guess?


Regards, José Gomes

José Gomes wrote:

Hello all! I'm trying to use the component to preview PDF files but somehow it's not working. For images, it's working fine, but for PDF I receive the message "No preview available". I'm trying to load it from the database.



Any guess?


Regards, José Gomes

Can I see your file name and file type? the component only get small-cased file name and file type. 

Willter Desamparado wrote:

José Gomes wrote:

Hello all! I'm trying to use the component to preview PDF files but somehow it's not working. For images, it's working fine, but for PDF I receive the message "No preview available". I'm trying to load it from the database.



Any guess?


Regards, José Gomes

Can I see your file name and file type? the component only get small-cased file name and file type. 

I've tried the component and I was able to view my pdf. I guess your problem is just the naming convention of the PDF if the Extension is in upper-case it won't work (i.e. Dummy.PDF ). 

mvp_badge
MVP

Hi Jose,

Willter solution helped you? are you using the demo application? is possible for you the upload that specific pdf or is confidential?

Regards,

Marcelo

Hey guys! Thanks for the quick reply.


So to give you more context, my guess is that this issue is happening cause the environment is only reachable via VPN, and to preview a document we use Google Viewer. As google can't open the link, we aren't able to display the document. If I open the "location" directly from the browser it works, but if I use the link using gview (https://docs.google.com/gview&url=xxxx) it doesn't work.


Regards,

José

mvp_badge
MVP

Hi José,

Yes that's a limitation of this component. the file needs to be public to be used by gview or officeapps.

Regards,

Marcelo


Hi Jose,

Use this expression in PDf  assignment, 


The expression is, 

"<iframe src='" + Location + "' width='" + Width + "' height='" + Height + "'></iframe>"

Instead of this,

This will always display the document.

Regards,

Komal

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