Need Help : Sometimes PDF does not render in web view

Hi Guys,

I followed some post in community where they said we can render PDF which hides the Menu items by using template column

as below

https://docs.google.com/viewer?embedded=true&url={Document}

replacing {Document} with url of my PDF which is uploaded in glide.

I sometimes find the pdf does not render and its very erratic.

I have reverted back to rendering the PDF URL directly.

Is there any CSS I can apply to hide the menu options from the top

Want to hide this.

Thank you in advance for your help.

Regards,
Dilip

Hi Guys,

Anyone else faced this PDF rendering issue on Webview with this method?

Regards,
Dilip

Can you provide an example of a PDF that won’t render?

Hi @Himaladin ,

Thank you for replying.

I have sent you DM the link of file (As it has some confidential information)

I am trying to render this in Webview

Issue I am facing : When I go back and click on detail page where the web view is at times it renders sometimes it just is blank

Regards,
Dilip

Previously, I optimized your file, which consists of 10 pages converted into images, reducing its size from 8.7MB to 2.8MB. In general, images require longer loading times compared to text.

I was able to replicate your issue only when I quickly navigated between pages, especially using Google Viewer rather than the built-in viewer. Unfortunately, the control menu of the viewer cannot be affected by CSS.

There’s not much I can do, aside from suggesting that you avoid rapidly switching pages. There are some guidelines you might want to ask GPT about how to create an optimized PDF.

3 Likes

Hi Himaldin,

Thank you for taking time to trying and helping me out.

Would converting the PDF to images and rendering it in image view be better approach?

Regards,
Dilip

To my knowledge, PDFs should be easier to open, but since they are embedded into a web-embed component, the file isn’t stored on the device ram compared to using an image component.

This is quite complex to explain when it comes to PDFs, as it could be related to the type of image file (BMP, TIFF, or JPEG, etc.), image resolution, the variety of fonts, the number of vector objects, and so on (feel free to ask GPT about this). Similarly, with the use of an image component (excessive resolution, etc.), everything should ideally be optimized beforehand before being uploaded.

1 Like

Hi @Himaladin ,

Thank you for your reply. I guess I will have to live with showing the menu option at the top for now.

Let me also consider hosting it somewhere and trying to see wether it can render.

Do you think that would be a better option?

Regards,
Dilip

So far I have been using G Drive storage and replacing the word “view” with “preview” from the shared url, it works smoothly.

Hi @Himaladin ,

You mean from this url ?

https://docs.google.com/viewer?embedded=true&url={Document}

Change viewer to

preview?

Like this?

https://docs.google.com/preview?embedded=true&url={Document}

Regards,
Dilip

The URL you get from your file in G. Drive, is not what you show.

https://drive.google.com/file/d/ID/preview
1 Like

Hi Himaldin,

Thank you for the quick solution. I tried putting the file in G drive and changing the view to preview as you suggested.

Looks like its much better and looks stable.

Thank you for helping me out.

Regards,
Dilip

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.