473,569 Members | 2,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error while opening cpdf_open() function.

254 Contributor
Fatal error: Call to undefined function cpdf_open() in D:\mukesh\www\m ukesh\school\pd f.php on line 3

and code is:
Expand|Select|Wrap|Line Numbers
  1. <?php $cpdf = cpdf_open(0);
  2.  
  3. // create a 600x400 page
  4. cpdf_page_init($cpdf, 1, 0, 600, 400, 1);
  5.  
  6. // display text  
  7. cpdf_begin_text($cpdf);
  8. cpdf_set_font($cpdf, "Helvetica", 18, "WinAnsiEncoding");
  9. cpdf_show_xy($cpdf, "This is a test", 50, 500);
  10. cpdf_end_text($cpdf);
  11.  
  12. // finish page
  13. cpdf_finalize($cpdf);
  14.  
  15. // write out to browser
  16. header("Content-type: application/pdf");
  17. cpdf_output_buffer($cpdf);
  18. cpdf_close($cpdf);
  19. ?>
  20.  
Help me with some examples..
Nov 16 '07 #1
4 2810
Atli
5,058 Recognized Expert Expert
Hi.

Please post all code examples within [code] tags.

[code=php]PHP code goes here[/code]

Thank you.

Moderator
Nov 16 '07 #2
Atli
5,058 Recognized Expert Expert
The problem with you code is most likely that your PHP installation does not include the ClibPDF Functions.

These functions are deprecated and therefore should not be used. I would recommend one of the alternatives mentioned in the link I posted above.
Namely the PDF Functions or the Haru PDF Functions.
Nov 16 '07 #3
bartonc
6,596 Recognized Expert Expert
OP hit 'Report' rather than 'Reply'.

Hello Atli
It worked but only for from page 1 to page 2 but not for from page 2 to page 3. So, supporting session by server is not issue and i am using php5.
please help me out
Nov 16 '07 #4
Atli
5,058 Recognized Expert Expert
That makes absolutely no sense what so ever. :)

Are you sure you posted this in the right thread? (The OP, that is)
Nov 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5020
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I double-checked the path to my error log. It is in /var/www/logs/php_error_log Thanks. :) -Wayne Stevenson
7
4912
by: mattsniderppl | last post by:
Hi, i'm relatively new to C++ from java and am having a difficult time with pointers. I'm sure there is something simple that I am doing wrong, but I can't seem to write this in a way that doesn't give me the error "Unable to write to memmory." This is a static function that receives a string that is the name of a file and an ifstream pointer....
2
12870
by: PA | last post by:
Hi All, Thanks for your attention..I appreciate that. -----Problem description -----------Start---------------------- Database : DB2 UDB 8.2 on Windows 2003 Client: VB6/ADO 2.7 on Windows 2003 1) I am opening a ADO 2.7 recordset with following settings
13
6581
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
4726
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
0
1778
by: fniles | last post by:
I am using VB.Net 2003 and MS Access database. Sometimes when I open the database, I got the error "Unspecified error" The application validate users, when it validates users, it reads from a table in the database. I use connection pooling by opening the database in Form_Load, then everytime somebody comes in, I open the database and reads...
0
11561
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access Security, but I'll start with something short and simple This code was written in Access 2003 but should be valid in Access 2000 By default, when you...
9
9545
by: Trent | last post by:
Here is the error while using Visual Studio 2005 Error 1 error LNK2019: unresolved external symbol "void __cdecl print(int,int,int,int,int,int,int,int)" (?print@@YAXHHHHHHHH@Z) referenced in function _main assign2.obj Thanks a lot ! Here is the code:
7
2473
by: kpfunf | last post by:
Getting the following error opening a report, cannot figure out the cause: "You tried to execute a query that does not include the specified expression 'RQ_FuelQuoteReportHistory.Vendor' as part of an aggregate function" Not sure why this comes up as Vendor is not part of any aggregate function (that I know of!). The query runs fine. The...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.