Create a PDF from uploaded file on Web server

Posted on 2004-10-27
Last Modified: 2008-03-06

Does anyone know of a way to creat a PDF from files that are uploaded to Apache web server running PHP and have that PDF displayed to the user or even provide a link to access the newly created PDF.

Question by:mgalloway23
    LVL 7

    Expert Comment


    It depends on your needs, what type of files do you want to convert ?
    You can use a pdf library to generate "on the fly" pdf files.
    A good library is FPDF :

    LVL 2

    Expert Comment

    LVL 12

    Accepted Solution

    by: (tutorial) (PHP PDF class) - simplest example uses FPDF (Generate PDFs with PHP) - pretty nice tutorial, got quite a few example.... (PDF Generation Using Only PHP part 1) - official PDF generation from ZEND (PDF Generation Using Only PHP part 2) - official PDF generation from ZEND (PDF functions reference)


    Author Comment

    I'm going to have a PHP page that the user will upload files to (doc, txt, xls) and then I want the system to look in the directory and convert thos documents into separate PDF's.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now