Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Putting pdf files on a web site

  1. #1

    Default Putting pdf files on a web site

    RE: Putting a pdf file on a web site

    I cannot insert a newsletter in a pdf. extension onto my website.
    Here’s what I have done so far to try to do this.

    1. Using “Unlimited FTP” in cPanel, I uploaded the newsletter file with the ftp. Extension
    2. Still in “Unlimited FTP”, I renamed the file and gave it a .jpeg extension. That was accepted.
    3. Going to “Page Wizard”. – using Wizard Images - I clicked on uploading this renamed file. BUT
    4. When I looked for the upload among the “Wizard Images”, it was not there.

    I next tried changed the .pdf extension to a .doc extension – didn’t work either.

    This newsletter file is some 550 KB’s and I thought size might be the problem so I tried cutting off the first page and making that small amount into a test page – I then uploaded it and went through the usual steps but even this small file did not appear in the list of images in “Wizard Images”.

    In File Manager, the file is shown in “Wizard Images” – both this small test file and the larger full newsletter file BUT neither would respond up if I clicked on the “View” or “HTML Editor” or the “Code Editor”.

    In the 5th column of data in File Manager, there is a column labeled “TYPE”
    Both of these – the test and the full newsletter file are listed as
    “image/x-generic”.

    There are other files in File Manager with the “image/x-generic” type – that respond when I click on “View” or any of the editing options BUT these two do not respond.

    What am I overlooking?

    Hal Cory
    hdcory@hotmail.com
    www.thesolidrockchhurch.info

  2. #2
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,643

    Default

    The problem is that a PDF file is not an "image" file. You can't change what it is simply by changing the file extension. A PDF file can't be "viewed" by an image viewer, and it can't be edited by an "HTML editor" or "code editor," because it's not an image, nor is it HTML code.

    A PDF file can be viewed only by Adobe Acrobat, which the user must have installed on his or her browser. Depending upon how the user has done the installation, it might open in a browser window, or it might actually launch Acrobat, and open the file there. But there's no way for a PDF to be displayed within a regular HTML page.

  3. #3
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,643

    Default

    I got curious, and did a little poking around. Google for convert pdf to jpg, and you'll find a bunch of utilities, many of them free, that claim to be able to convert a PDF document to an image file, either a JPG or a PNG. That's what you need, if you want to display a PDF on a web page. I can't tell you which ones are good, since I've never tried any of them.

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,944

    Default

    I have numerous PDFs on my web site. I have never had any trouble uploading the static ones to the site with either ws-ftp or filezilla or generating the dynamic ones with PHP and FPDF.

    Displaying the PDF in the web browser relies on your visitor having the Adobe Reader plugin installed in their browser. The PDF can then be displayed as a page by itself or within another page using frames, an iframe or img tag. A PDF can display using an <img> tag even though it isn't a regular image format.

    It sounds like the problem that the original poster is having here is that they are using an FTP program that only supports limited file formats and needs to switch to a more general FTP program.

  5. #5
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,643

    Default

    Well, no - he has stated that he uploaded the file using Unlimited FTP, and that part of the process presented no problems. Things only start getting ugly when he tries to rename the file with a JPG extension, and then tell Page Wizard to insert it into a page as if it were a JPG. The problem, in this case, is that you can't just put a JPG extension on a file and magically turn it into a JPG.

  6. #6
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,643

    Default

    Quote Originally Posted by felgall View Post
    A PDF can display using an <img> tag even though it isn't a regular image format.
    I'd really like to see an example of that - when I try it, all I get is a tiny square where the PDF should be, with a little symbol indicating that it can't display the image.

  7. #7
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,643

    Default

    Quote Originally Posted by felgall View Post
    The PDF can then be displayed as a page by itself or within another page using frames, an iframe...
    This also produces less than satisfying results. What you get in the frame is the entire Acrobat reader, complete with menu bar, scrollbars, etc. I believe the original poster here simply wants to display the contents of the PDF file on his web page, as an image, not to bring up the entire reader.

  8. #8
    Join Date
    Feb 2006
    Location
    Fresno, CA
    Posts
    629

    Default

    Open pdf file. Reduce view to 25% or so. Copy image or screen capture. Open graphics program, paste as new image. Crop or resize, save as myPDF_picture.jpg

    In web page, <a href="my_pdf_file.pdf"><img src="myPDF_picture.jpg"></a>

  9. #9
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,944

    Default

    Converting a PDF to an image is not a good idea. A 10k PDF could easily become a 10Mb image since all the text in the PDF would be converted into a graphical representation of the text and would therefore take up thousands of times as much space in order to still be readable as part of the image.

    Displaying text in images is not a good idea for more than a few words maximum such as in a heading.

  10. #10
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,643

    Default

    A screen capture of a PDF, converted to a JPG, ends up being considerably smaller than the PDF itself. I just tested it - I opened an 85KB PDF, took a screen capture, saved it as a JPG, opened the JPG in Picasa to crop out the other screen stuff (the desktop, Acrobat reader menu bars, etc.), saved it, and it ended up at 45KB.

    And given that I still know of no way to display a PDF on a web page without invoking the Acrobat reader, there isn't much choice, is there?

Posting Permissions

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