WebSite X5Help Center

 
Adrian B.
Adrian B.
User

PDF viewer doesn't always load  en

Autore: Adrian B.
Visite 1952, Followers 1, Condiviso 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

Postato il
13 RISPOSTE
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

(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

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator

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.

Leggi di più
Postato il da Aleksej H.
Adrian B.
Adrian B.
User
Autore

Thanks for the replies; some optimization on my side required.... :)

Adrian

Leggi di più
Postato il da Adrian B.
Aleksej H.
Aleksej H.
Moderator

It's my pleasure.Good luck.wink

Leggi di più
Postato il da Aleksej H.
Adrian B.
Adrian B.
User
Autore

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....?

Leggi di più
Postato il da Adrian B.
Aleksej H.
Aleksej H.
Moderator

"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.

Leggi di più
Postato il da Aleksej H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... 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)

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Adrian B.
Adrian B.
User
Autore

Again thank you for the comments.

KolAsim, the iFrame is an object of X5? I do not see it available in Objects Management...?

Leggi di più
Postato il da Adrian B.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Adrian B.
Again thank you for the comments. KolAsim, the iFrame is an object of X5? I do not see it available in Objects Management...?

... 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

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Adrian B.
Adrian B.
User
Autore

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

Leggi di più
Postato il da Adrian B.
Aleksej H.
Aleksej H.
Moderator

"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.

Leggi di più
Postato il da Aleksej H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Adrian B.
... ... .... are you saying iframe code into html object is a better/cleaner alternative to the PDF object choices (google viewer and iframe). ... ... 

(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

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪