Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2011
    Location
    South Africa
    Posts
    60
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Upload pdf files then display them in a table

    I would like to be able to upload pdf files to my site and for them to be displayed in a table, does anyone know how I can achieve this? I have looked online for tutorials but can't find any. As fas as I know it can be done with php, jquery and json. Thanks in advance.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,531
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    PDF files are PDF files. When viewed, the user's PC opens them with a PDF viewer.

    There might be a way to upload them and convert them to a single image, like PNG or JPG, but it would no longer be a PDF file at that point.

    Unless you mean "display the PDF filename and link" in a table? In that case it can be done.

    I'm not sure if you mean display the actual PDF (visually), or display a link (filename) to the PDF file.

  • Users who have thanked mlseim for this post:

    helen11 (12-04-2013)

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Yes but you need to convert pdf to thumb image

    Quote Originally Posted by helen11 View Post
    I would like to be able to upload pdf files to my site and for them to be displayed in a table, does anyone know how I can achieve this? I have looked online for tutorials but can't find any. As fas as I know it can be done with php, jquery and json. Thanks in advance.
    Google this ....execute imageMagick's 'convert', setting the color space to RGB and size to 200px wide

    you'll find out how to do this, but you need to make sure the imagick extention is active on your server.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,451
    Thanks
    17
    Thanked 275 Times in 275 Posts
    Just use Imagemagick to make thumbnail images of the first pages and put those images in your table.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #5
    New Coder
    Join Date
    Nov 2011
    Location
    South Africa
    Posts
    60
    Thanks
    14
    Thanked 0 Times in 0 Posts
    I mean display the PDF filename and link in a table, not a picture of the pdf. If anyone knows how I can do this with php, jquery, json that would be great.

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,531
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    Step 1 ...
    Find a free PHP script that allows you to upload files to a directory.
    Google: PHP file upload

    Step 2 ...
    Install/upload that script and get it working. Most scripts allow you to set the filetype, in your case .pdf and then define the directory where they are uploaded to. You have to consider if PDF filenames can be the same (overwriting the old one), or does each PDF require a unique name.

    Step 3 ...
    You only mentioned showing a link to the PDF. You didn't say anything about a sentence or paragraph about the PDF file. If that is required, more programming needs to be done.

    Step 4 ...
    When your upload works, let us know and we can show you how to use PHP to dynamically display them on a web page.


    .


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •