Solved

Fatal error: Call to undefined function: pdf_new()

Posted on 2003-11-19
4
4,954 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP AJAX JSON 2 61
writing a post to a file that is on same folder and same webserver 5 32
PHP Form Calculate Total Price 10 43
PHP Query return divisible by 3 3 18
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

803 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