Solved

Fatal error: Call to undefined function: pdf_new()

Posted on 2003-11-19
4
4,912 Views
Last Modified: 2009-03-27
I'm on a shared hosting account and I'm trying to create a pdf using php but keep get this errror

Fatal error: Call to undefined function: pdf_new()


// create handle for new PDF document
$pdf = pdf_new();

// open a file
pdf_open_file($pdf, "philosophy.pdf");

// start a new page (A4)
pdf_begin_page($pdf, 595, 842);

// get and use a font object
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);

// print text
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,",50, 750);
pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50,730);

// end page
pdf_end_page($pdf);

// close and save file
pdf_close($pdf);

0
Comment
Question by:dougbnv
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
ashoooo earned 125 total points
ID: 9782721
Is PDFlib installed on that machine?
0
 
LVL 6

Expert Comment

by:aolXFT
ID: 9783847
A more likely question would be whether or not the pdflib extension is installed.

Check out: http://ie.php.net/extension-loaded
0
 
LVL 3

Expert Comment

by:ashoooo
ID: 9784519
What else did I say?
0
 
LVL 3

Expert Comment

by:ashoooo
ID: 9784520
Oh sorry
/me apologizes
0

Featured Post

Easy Project Management (No User Manual Required)

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

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
The viewer will learn how to count occurrences of each item in an array.
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…

747 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

11 Experts available now in Live!

Get 1:1 Help Now