Webpage for viewing pdfs

I want to make a webpage for viewing ~600 pdfs, (2-3mb each) with sidebar links and previews, etc. can i host my pdfs on my infinityfree site or is that not possible, should i host then elsewhere to link to my site. if the latter, please recommend a free solution. Thanks!

This

Any file storage provider (Google Drive, Box, Dropbox, etc) will work

6 Likes

Hi BobTheCow,

If you do not want to redirect users elsewhere, you can convert pdfs into images using tools like GhostScript and ImageMagick.

Syntax for rendering cover:
magick convert -density 300 sample.pdf[0] sample.png

Syntax for rendering the whole thing:
magick convert -density 300 sample.pdf sample.png

You might want to organize images for each PDF as separate folders.

To obtain the filenames for the folder:

$pages = array_diff(scandir('path/to/pages'), ['.','..']);

Cheers!

I would go against throwing those commands to others especially for free hosting users.

First of all, ImageMagick isn’t pre-installed on Windows. You having Imagick doesn’t mean that everyone has that.

Given the fact that there’s no SSH here, it can greater confuse people.

I would also go against throwing such code to other users without sufficient prior information. Not all websites are coded in PHP, not all people know how to code in PHP, and a lot of people don’t know what is a “PHP”. And yes, this is especially true for free hosting users.

3 Likes

You can host your software and link to them from your website host on infinityfree by using Googledrive, Dropbox, OneDrive, GitHub page.

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