Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

h3nryk

Pioneers
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Real Name
    Henryk

h3nryk's Achievements

  1. Hi, The Problem: I want to show a preview or the whole PDF content in image form. I've found this in web: (link) 1. <?php 2. exec(‘command line to run’); 3. ?> 1. <?php 2. exec(‘/path/to/imagemagick’); 3. ?> 1. <?php 2. //the path to the PDF file 3. $strPDF = "my_pdf.pdf"; 4. 5. exec("convert \"{$strPDF}[0]\" -colorspace RGB -geometry 200 \"output.gif\""); 6. ?> 1. <?php 2. //the path to the PDF file 3. $strPDF = "my_pdf.pdf"; 4. 5. exec("convert \"{$strPDF}\" -colorspace RGB -geometry 200 \"output.jpg\""); 6. ?> 1. <?php 2. //the path to the PDF file 3. $strPDF = "my_pdf.pdf"; 4. 5. exec("convert \"{$strPDF}[0]\" -colorspace RGB -geometry 1024 \"output.png\""); 6. ?> 1. <?php 2. //the path to the PDF file 3. $strPDF = "my_pdf.pdf"; 4. 5. exec("convert \"{$strPDF}\" -colorspace RGB -geometry 1024 \"output.png\""); 6. ?> I just don't understand few things.. Questions: How to instal: ImageMagick and GhostScript using CPanel or FTP ? Can I do do this myself or need to ask server support ? Where to install, how ??? Instead of product image I want to show PDF file preview - one or more pages of ebook, how to do it ?How to use the code ? 1. <?php 2. exec(‘/path/to/imagemagick’); 3. ?> 1. <?php 2. //the path to the PDF file 3. $strPDF = "my_pdf.pdf"; 4. 5. exec("convert \"{$strPDF}[0]\" -colorspace RGB -geometry 200 \"output.jpg\""); 6. ?>
×
×
  • Create New...