Page 1 of 1

php image and pdf enquiry

Posted: Wed Nov 04, 2009 11:41 am
by nagrgk
Dear all,

I have downloaded libharu2.1 .but not understading where to install and where to paste ext or dll or place folder libharu2.1 .

When i execute the some image says that HaruDoc not found error.

Please suggest me how to include haru folder

Please.
Regards,
nagaraja kharvi

Re: php image and pdf enquiry

Posted: Wed Nov 04, 2009 5:32 pm
by McInfo
Find the locations of your extension directory and php.ini file.

Code: Select all

var_dump(ini_get('extension_dir'), php_ini_loaded_file());
Put the DLL in the extension directory.

Add a line to the php.ini file. Use the correct name of the DLL file.

Code: Select all

extension=php_libharu.dll
Some resources: Edit: This post was recovered from search engine cache.

Re: php image and pdf enquiry

Posted: Wed Nov 04, 2009 11:35 pm
by nagrgk
Hi,


Thanks for the reply.Thank you very much.

The code says this is the dir and file path:string(16) "D:\xampp\php\ext" string(20) "D:\xampp\php\php.ini"
Ihave added extension=php_libharu.dll to php.ini but where to find dll file .What i have is that zipped file of libharu-2.1.0.zip(trz).where to paste and find file .If u give me clear step by step instruction that would help me a lot.This is first time i am going to pdf file using php.Please ha.......


and i have one more request is that when i tried to create chart (anytype) ,will be getting following error-even not even single time executed program.
‰PNG ��� IHDR�����Œ���(l!:��>IDATxœíÝ=NdGЋÈѬÀ"ɲÙ+pÒ19pÈ^ȉIf8²F–8 ³ÙÀ9pÐ2B€5¯Û·_Ý[uŽF-4 ªùùôQÕUï½»¿ÿÒ€ÿ礵vzú¾÷Ӏ¶ۇoz? A�A‚�‚ $ H@ € A�A‚�•‚ty±¹¼ØìÞèþx¶¹:ö¿î_£Ç§_¹¯:YòA,üzÖq¶¹úî‡_Ž÷ù?úx¼OÎ^®on—|XFJ•¢»Çóc§è¨ŸŸ½,üÝ+¤T)Z¡‹¤(•…´êŸv»HìžÙóx<ÿŸÏ;UŠtÑ„./6K²´^#=EâÍl¼ùÞT)ÒEs*?GJ•"]4­Ú«v©R´[‰>êJš¥•qŽT—Åîi¥›#AEidwçg›«ÖŽøØûKÌba# R=öU¬©üªo²~¸²qv6ðÄkYëÓH£ÑE]h¤¡è¢^4Ò8tQGµw6ðľо¼Ž4‹ÝÙÙ�Ì‘ €U; ‘ €F‚� do¤…A‡¾²¿Ž”ê09…¬|Ëy$´þY,s$FÓeÏaö9ì¥×þwÄ8:î×H¢ïY,ÄºŸÅr‰ò2œÅÊþ:,Ñý,V™óH¶8Y™9’-dfÕ”i$ÈL#A�4ÐH@#A�4ÐH@#A€ìd¯*%do${U)!{#A Ù JÐH@#A�4ÐH ]#y–Š4H×HPÑøWZ]ùÎmÌ©Ìû›;­ç6æTfŽtÀîÕîw(`ÃΑúÞ-‡Ù”i¤½è"V6`#Ië­‘¤ˆ.†ºcßÝãyë}ç6æ4ÚëH»é¢Ìû ³ÑæHÐÅ€«v°>4ÈÞHÎùQBöFr¥UJÈÞHPBöF‚²7’9%do$s$Jm¯yLuµŒ2×l –Ù®–‘}ŽDEž ËxÉCis^-C#iÂ.ÚɾjG!svÑŽF"Æ´]´“qŽô&§ÌÎ6Wmî«e”yiá:=½LµØýšk6@�s$`Õh$ ‘ €F‚� h$ ‘ €F‚� h¤�}¯Ðbô¾£?üªþ›Vsúüéã¯?´ö¡µv÷ÛßFŸpôÖÚïü©‘÷ïwÓèS¾<ú5lþö¯ÿz—Ñçý°m·Y–¿_$ÇU¨%ËŸv×7·»ðˆe ÒŽQT® AQ‚ $ H@ € A�A‚�‚ $ H@ ÀIkm»}èý4 ¶�‹DÑî: ����IEND®B`‚



what is this ?
i have php5.2 which has gd library installed.even then getting following error.


i will be waiting for your answers genious

regards,
nagaraja kharvi
9019055436

Re: php image and pdf enquiry

Posted: Thu Nov 05, 2009 12:52 pm
by McInfo
After a long and frustrating journey, I finally created a PDF file with HaruDoc. Most of the trouble was caused by my lack of experience with compiling extensions for PHP on Windows and was compounded by the lack of concise documentation on the subject as well as the fact that variations of the Haru source code can be found in a number of locations rather than one single location. I should have just downloaded a compiled DLL, which is what I eventually did.

Step-by-step instructions:
  1. Download php_haru.dll.
  2. Save it to your extensions folder.
  3. Add "extension=php_haru.dll" to your php.ini.
  4. Start or restart Apache.
  5. Copy the HaruDoc example script to a PHP file.
  6. Run the script.
Another obstacle I discovered is that the HaruDoc::save() method requires that $file be given as an absolute path and not a relative one. If you need to save to a relative path, you can use HaruDoc::output() along with Output Buffering functions and file_put_contents().

For the script that is outputting the PNG image as characters, add a Content-Type header.

Code: Select all

header('Content-Type: image/png');
Edit: This post was recovered from search engine cache.

Re: php image and pdf enquiry

Posted: Thu Nov 05, 2009 9:58 pm
by nagrgk
Dear friend,

thanks for giving me the procedure.I did that and when I started apache server alerts coming up saying

1)the application or DLL D:\xampp\php\ext\php_haru.dll is not valid windows image.please check this against your installation diskette.
2)php startup:unable to load dynamic library D:\xampp\php\ext\php_haru.dll-%1 is not a valid win32 application.

what is this actually?I use php 5.3 version.

Please solve the problem friend.

awaiting for responce.thanking you

nagaraja kharvi

Re: php image and pdf enquiry

Posted: Thu Nov 05, 2009 11:58 pm
by McInfo
The php_haru.dll that I linked to was for PHP 5.2, so you'll have to find (or compile) one for PHP 5.3. I'm sorry I can be more helpful at the moment.

Edit: This post was recovered from search engine cache.

Re: php image and pdf enquiry

Posted: Fri Nov 06, 2009 12:22 am
by nagrgk
might be you correct. I could not get the php5.3 dll file.try to install php5.1
and check out.

friend i have informed you the other problem that I getting output of special charcters that i have pasted in the earlier post .wat is that actually? it belongs to gd library.

please help na...........

pls send me If you have code for creating bar chart and creating pdf for that image and send through email.

please help for both

thank u for helping in all the way

nagaraja

Re: php image and pdf enquiry

Posted: Fri Nov 06, 2009 1:15 am
by McInfo
nagrgk wrote:friend i have informed you the other problem that I getting output of special charcters that i have pasted in the earlier post .wat is that actually? it belongs to gd library.
The server responded with a "Content-Type: text/html" header, so the browser does its best to display the content as HTML. PNG is a binary format, so the content appears as scrambled characters. You need to tell the server to send a "Content-Type: image/png" header. I posted the PHP code for that earlier.
nagrgk wrote:pls send me If you have code for creating bar chart and creating pdf for that image and send through email.
If you want someone to write the code for you, please post your requirements in the Job Hunt or Volunteer Work forum.

Edit: This post was recovered from search engine cache.

Re: php image and pdf enquiry

Posted: Fri Nov 06, 2009 1:31 am
by nagrgk
thank you very much

i will get back to you