Arpit Gupta
Arpit Gupta

Reputation: 1277

Issue in loading time and size of images for PDF first page preview

I am working on website which is having huge amount of PDFs shown to its page. Those PDFs are listed on the page. The count may be 150 on every page.

We need to show the preview of first page of those PDFs to show the user whats inside every PDF.

What I am doing now?

While uploading those PDFs on clouds, I am creating previews of first page of those PDFs (1 small preview and 1 large preview) using a tool called PQScan.

Small preview will be shown on page by default, Large preview will be shown on mouse hover.

What is the problem?

For around 150 PDFs per page, The loading time of small and large preview(.gif/.jpeg/.png images) from cloud is taking a lot of time.

Image for refrerece on how I am showing -

enter image description here

Is there any better way to tackle this problem to resolve the issue faced? Also the size occupied by these images on cloud?

Upvotes: 2

Views: 452

Answers (1)

Manikiran
Manikiran

Reputation: 1

Some suggestions from my knowledge are:

  • Use Lazy loading technique to improve your page load time. Refer Google Documentation to know more about this.
  • Save random pages of the document as single images (such as cover page, some 2-3 random pages in between). Then instead of automatic slideshow or GIF, only show the cover page preview image. And on mouse hover, you can load and display other pages as slideshow or any animation effect you can implement.
  • Use Next Generation image formats as they are much smaller compared to older formats. Refer here for more detailed information.

Upvotes: 1

Related Questions