Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-09-2004, 10:10 AM PDF Errors
Themodem's Avatar
Average Talker

Posts: 22
Location: England
Trades: 0
Hi all, ive been trying to get to grips with the PDF library but i keep getting the following errors. im trying to put the pdf to the browser and not save it on the drive.


Warning: pdf_open_file() expects exactly 2 parameters, 1 given in C:\Programs\Apache Group\Apache2\htdocs\themodem.mine.nu4\random\pdf. php on line 17

Fatal error: pdf_begin_page(): [2100] PDF_begin_page: Function must not be called in 'object' scope in C:\Programs\Apache Group\Apache2\htdocs\themodem.mine.nu4\random\pdf. php on line 23

heres the code im using

PHP Code:
$pdf pdf_new();
pdf_open_file($pdf);

pdf_set_info($pdf"author""Themodem");
pdf_set_info($pdf"title""Test");
pdf_set_info($pdf"subject""Test Script");

pdf_begin_page($pdf450450);
$font pdf_findfont($pdf"Helvetica-Bold",  "winansi",0);
pdf_setfont($pdf$font12); 

pdf_show_xy($pdf"Themodem"5225); 
pdf_end_page($pdf);
pdf_close($pdf); 
$buffer pdf_get_buffer($pdf); 

header("Content-type: application/pdf");
header("Content-Length: ".strlen($buffer));
header("Content-Disposition: inline; filename=zend.pdf");

pdf_delete($pdf); 
can anyone see any problems?

Cheers Lee
Themodem is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to PDF Errors
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14968 seconds with 12 queries