Solved

Fatal error: Call to undefined function: pdf_new()

Posted on 2003-11-19
4
5,038 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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 four methods for overlaying images in a container on a web page
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

707 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