[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5298
  • Last Modified:

Fatal error: Call to undefined function: pdf_new()

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
dougbnv
Asked:
dougbnv
  • 3
1 Solution
 
ashooooCommented:
Is PDFlib installed on that machine?
0
 
aolXFTCommented:
A more likely question would be whether or not the pdflib extension is installed.

Check out: http://ie.php.net/extension-loaded
0
 
ashooooCommented:
What else did I say?
0
 
ashooooCommented:
Oh sorry
/me apologizes
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now