PDF viewer doesn't always load
Auteur : Adrian B.
Visité 2219,
Followers 1,
Partagé 0
The PDF viewer doesn't always load on my web pages.
Every product landing page is 3 objects: a text object, a picture object and a pdf viewer object.
The PDF viewer doesn't always load. The page has to be refreshed to ensure it loads.
Happens in Chrome and Firefox; haven't tested any other browers.
website: tadpoletape.com
sample of page attached where viewer failed to load.
Any ideas would be very helpful:
Adrian
Posté le
(It > En) ... the PDF is seen in a regular way ...
... the eventual problem does not depend on the program ...
... it could depend on the browser, or on google ...
... the PDF file is not a web format, it was born for other purposes ...
... avoid using very long file names ...
.
ciao
.
I checked this page in six different browsers. Everything loaded fine. I see that the PDF file (with viewer) is 1.04 MB. It may not always load fast enough. Try to compress this file.
The file itself was 531 KB. I compress file with FileOptimizer64. Now it is 53% less.
Auteur
Thanks for the replies; some optimization on my side required.... :)
Adrian
It's my pleasure.Good luck.
Auteur
Aleksej, .... I still think this may be an object problem.... The page/file you chose to test is the only page with such a large file - as it is the entire product group pdf. The individual product landing pages have much smaller pdf files; 120 to 170k roughly.
As I test this the random no-load happens with chrome, firefox, edge and opera - which brings me back to the object? Is there a size restriction with the viewer object? It does load a 25Mb file no problem.
I could add a text line that tells the user "if no viewer below, then reload the page", solves the issue as reload solves the problem every time, but I shouldn't have to - something isn't quite right....?
"Is there a size restriction with the viewer object?" - As far as I know, no.
"but I shouldn't have to - something isn't quite right....?" - It can help users.
... as mentioned before, it is not a problem of the program, but of GoogleDocsViewer, depending on the time, the weight of the page, and the network flow ...
... possibly use the PDF in IFRAME (or in the showbox); ... the PDF will be opened in enabled browsers, and will be downloaded in obsolete browsers ...
... >> see example ...
... as said before, better to avoid PDF files not born for the web ...
... better to use HTML pages ...
... or convert the pages into images to be displayed in a gallery ...
(EXTRA - in the case of HTML, IFRAME + GoogleDocsViewer, you could integrate a JavaScript code to refresh the IFRAME content at the end of the page loading, but it is for experts)
.
Auteur
Again thank you for the comments.
KolAsim, the iFrame is an object of X5? I do not see it available in Objects Management...?
"KolAsim, the iFrame is an object of X5? I do not see it available in Objects Management...?" - yes "PDF File" https://magazin.aleksius.com/en/blog/28-data-visualization-2
... as Aleksej H. has already said ...
... or with the simple IFRAME code pasted into an HTML Code Object
... see example GoogleDocsViewer with your PDF; (temporary link!);
... see "normal" example with your PDF; (temporary link!);
... Ctrl+U to view and copy the code of line 13, which you can try immediately in your project ...
ciao
.
Auteur
Thank you both for your comments and shared resources. I will try that out.
I have also tried a pdf optimizer and found a few that bring the file size down to less than half of my pdf creator (BCL pdf maker).
Given the options..... are you saying iframe code into html object is a better/cleaner alternative to the PDF object choices (google viewer and iframe).
I will test it out tonight with the 3 ways and see what is more consistant at displaying the pdf.
Thank you very much both; I do appreciate the time you have given me.
Adrian
"are you saying iframe code into html object is a better/cleaner alternative to the PDF object choices (google viewer and iframe)." - Try it yourself and decide.
Good luck to you.
(It > En) ... on your page you already had GoogleDocsViewer in use; ... this method linked to google allows to widen the compatibility for PDF files on the various devices ...
... instead the direct URL to the pure PDF file can be seen only on the browsers equipped with the related plug-in, and in those without, instead, the downloading of the file for local consultation with one's reader would be activated...
... idea! ...with my method you could also put a button > iframe refresh ... (Ctrl+U)...
.
ciao