473,503 Members | 1,747 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\mukesh\school\pdf.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 2808
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
5011
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...
7
4905
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...
2
12867
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...
13
6572
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
4712
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...
0
1767
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...
0
11551
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...
9
9542
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...
7
2463
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...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
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...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
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...
0
5579
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,...
0
4675
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...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.