Hi ,
I am trying to Create a PDF File in PHP :
This is the coding which i followed :
But when i am trying to run this program,i am facing an error is :
Fatal error: Uncaught exception 'PDFlibExceptio n' with message 'pdf_set_parame ter() expects parameter 1 to be resource, null given' in C:\Program Files\xampp\htd ocs\pdf_file.ph p:44 Stack trace: #0 C:\Program Files\xampp\htd ocs\pdf_file.ph p(44): pdf_set_paramet er() #1 {main} thrown in C:\Program Files\xampp\htd ocs\pdf_file.ph p on line 44
thanks.....
I am trying to Create a PDF File in PHP :
This is the coding which i followed :
Code:
<?php $pdffile=pdf_new(); pdf_open_file($pdffile,"F:\bharat.pdf"); pdf_begin_page($pdffile,595,842); $fontdir = "C:\WINDOWS\Fonts"; [B]pdf_set_parameter($$pdffile, "FontOutline", "arialMyName=$fontdir\arial.ttf");[/B] $font1=pdf_findfont($pdffile,arialMyName,"host",0); pdf_setfont($pdffile,$font1,10); pdf_show_xy($pdffile,"Keep Trusting God",50,750); pdf_end_page($pdffile); pdf_close($pdffile); ?>
But when i am trying to run this program,i am facing an error is :
Fatal error: Uncaught exception 'PDFlibExceptio n' with message 'pdf_set_parame ter() expects parameter 1 to be resource, null given' in C:\Program Files\xampp\htd ocs\pdf_file.ph p:44 Stack trace: #0 C:\Program Files\xampp\htd ocs\pdf_file.ph p(44): pdf_set_paramet er() #1 {main} thrown in C:\Program Files\xampp\htd ocs\pdf_file.ph p on line 44
thanks.....
Comment