Solved

Fatal error: Call to undefined function: pdf_new()

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

828 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