Ask a Question related to Adobe Acrobat Macintosh, Design and Development.
-
Jack #1
PDF Problem
Dear all
I want to convert a text file to pdf format and store it in somewhere in my
harddisk.
I had found out that there is a dll inside my php4.04 directory
("c:\php\extensions\php_pdf.dll") and from php.ini i had check that the
extension_dir=c:\php\extensions;
extension=php_pdf.dll had actived;
now i obtained a simple script from the net, and tried to test it , but it
return alot of errors!
Here is the testing script :
<?php
dl("php_pdf.dll");
# $Id: hello.php,v 1.9 2003/03/14 17:07:56 rp Exp $
/* create a new PDFlib object */
$p = PDF_new();
/* open new PDF file; insert a file name to create the PDF on disk */
PDF_open_file($p, "");
PDF_set_info($p, "Creator", "hello.php");
PDF_set_info($p, "Author", "Rainer Schaaf");
PDF_set_info($p, "Title", "Hello world (PHP)!");
PDF_begin_page($p, 595, 842); /* start a new page */
$font = PDF_load_font($p, "Helvetica-Bold", "winansi", "");
PDF_setfont($p, $font, 24.0);
PDF_set_text_pos($p, 50, 700);
PDF_show($p, "Hello world!");
PDF_continue_text($p, "(says PHP)");
PDF_end_page($p); /* close page */
PDF_close($p); /* close PDF document */
$buf = PDF_get_buffer($p);
$len = strlen($buf);
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=hello.pdf");
print $buf;
PDF_delete($p); /* delete the PDFlib object */
?>
and here is the error message i got when i ran the script :
X-Powered-By: PHP/4.0.4pl1 Content-type: text/html
Warning: Function registration failed - duplicate name - pdf_set_info in
C:\InetPub\wwwroot\Nedcor Internal Live\test\hello.php on line 2
Warning: Function registration failed - duplicate name -
pdf_set_info_creator in C:\InetPub\wwwroot\Nedcor Internal
Live\test\hello.php on line 2
Warning: Function registration failed - duplicate name - pdf_set_info_title
in C:\InetPub\wwwroot\Nedcor Internal Live\test\hello.php on line 2
Warning: Function registration failed - duplicate name -
pdf_set_info_subject in C:\InetPub\wwwroot\Nedcor Internal
Live\test\hello.php on line 2
Warning: pdf: Unable to register functions, unable to load in Unknown on
line 0
Fatal error: Call to undefined function: pdf_new() in
C:\InetPub\wwwroot\Nedcor Internal Live\test\hello.php on line 6
PHP Warning: Unable to load dynamic library
'c:\php\extensions/libpdf_php.dll' - The specified procedure could not be
found. in Unknown on line 0
Can anyone seens this before? if so, could you please give me some hints how
i can convert a text file to pdf file under windows environment?
Thx alot
Jack
Jack Guest
-
contribute problem - access denied file may not existpermission problem
Recieving the following error message - "access denied file may not exist , or there could be a permission problem" this happened this morning ,... -
Problem playing Quicktime thru .DCR embedded in HTML - pathreferencing problem?
Greetings earthlings and Director heads. Here's the problem: created an HTML file containing shockwave (dcr) movie that calls quicktime movies in... -
Uploading problem = weird warning (was: access denied problem.....)
Hi, I had a problem where my upload form was not working on our production server but was working on two other servers, after checking the... -
#21611 [Opn]: Problem with version_compare() (Was: Problem with pear cli and release numbers)
ID: 21611 Updated by: et@php.net -Summary: Problem with pear cli and release numbers Reported By: jan at horde... -
Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I... -
Joerg Behrens #2
Re: PDF Problem
"Jack" <nedcor4@nedcor.com.hk> schrieb im Newsbeitrag
news:20030829085238.3663.qmail@pb1.pair.com...my> Dear all
> I want to convert a text file to pdf format and store it in somewhere inThis is not needed because you already have load the extension in your> harddisk.
> I had found out that there is a dll inside my php4.04 directory
> ("c:\php\extensions\php_pdf.dll") and from php.ini i had check that the
>
> extension_dir=c:\php\extensions;
> extension=php_pdf.dll had actived;
>
> now i obtained a simple script from the net, and tried to test it , but it
> return alot of errors!
>
> Here is the testing script :
> <?php
> dl("php_pdf.dll");
php.ini when used 'extension=php_pdf.dll'
$ext = 'pdf';
if(!extension_loaded($ext)){
// windowsstyle = php_gd[2].dll
// unix = gd.so
dl((strIstr(PHP_OS, 'win')) ? 'php_'.$ext.($ext == 'gd2' )? 2: ''.'.dll' :
$ext.'.so');
}
might be a solution. But keep in mind that dl() cant use when safe_mode is
on and when running a threaded webserver and mod_php under windows.
This ever happens when you try to load a extension twice or when creating a> Warning: Function registration failed - duplicate name -
> pdf_set_info_creator in C:\InetPub\wwwroot\Nedcor Internal
> Live\test\hello.php on line 2
function wich already exists.
regards
Joerg
Joerg Behrens Guest
-
Michelle_L._Young@adobeforums.com #3
PDF problem
Occasionally when I create PDF files and email them to my client's, the I's and L's convert to a colon. They look fine on my screen and print fine on my end. My client however is experiencing this. There is no rhyme or reason to when it happens either and it doesn't happen all the time. I work on a MacIntosh and the people having the problems when they receive my PDF's are using PC's. Any thoughts?
Michelle_L._Young@adobeforums.com Guest
-
Jon_Bessant@adobeforums.com #4
Re: PDF problem
Are you 100% sure ALL the fonts are embedded?
Otherwise you might be a victim of soft substitution occuring at the
client workstation in an attempt to soft-view the characters ...
Otherwise for test purposes, get at least one workstation on EXACTLY the
same version as yours ....
Jon
Jon_Bessant@adobeforums.com Guest
-
peter kleinheider #5
Re: PDF problem
Hi Michelle
Once Adobe had an error in its Library where this occurred. If I remember correctly the same engine was also used in Acrobt 5 to display and print PDF's.
Some OEM's integrated this same PDF Library into their workflows and therefor also produce a "wrong" output. With todays versions of the workflows out in the field the problem is gone. Only companies that did not update might have problems. E.g. Trueflow 2 has this behavior.
Peter
peter kleinheider Guest
-
Michelle_L._Young@adobeforums.com #6
Re: PDF problem
Yes, all fonts are embedded. So if I'm hearing you guys correctly, upgrading to Acrobat 7.0 should solve this problem?
Michelle_L._Young@adobeforums.com Guest
-
peter kleinheider #7
Re: PDF problem
Correct, the side that does the output has to upgrade
Peter
peter kleinheider Guest
-
Michelle_L._Young@adobeforums.com #8
Re: PDF problem
Thank you so much for your help!
Michelle_L._Young@adobeforums.com Guest



Reply With Quote

