PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
problem with File_PDF -- no font set?

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats
View previous topic :: View next topic  
Author Message
buk110



Joined: 20 Mar 2007
Posts: 1

PostPosted: Tue Mar 20, 2007 3:55 pm    Post subject: problem with File_PDF -- no font set? Reply with quote

Hi guys, new to this msg board but maybe someone can help me with this small problem with File_PDF.

I have a little hello world demo, but it does not seem to work.

First I will post the code; then explain the error.


Code:
$p = &File_PDF::factory('P', 'mm', 'A4');

$p->setinfo('title', 'This is the title of the pdf');
$p->setinfo('subject', 'The Subject');
$p->setinfo('creator', 'Who made this?');

$p->open();
$p->addPage();
$p->setXY(50 , 15);
$p->setFont('arial', '' , 20);
$p->write(0 , 'this is a test, please work');
$p->output('mytest.pdf', false);
$p->close();



So, I goto the .php file that I've created and the save/open pdf file window pops up as expected. I click open to view the file -- however, when I open it under Linux all I get is the title.

when I go to view this file under windows; adobe gives me the error 'font has not been set'

I've then gone and done a tail error_log in my httpd logs and nothing appears to be wrong.

Any suggestions? Advice?

Thanks for any potential help.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software