pdf support in xampp windows 1.7.1

Problems with the Windows version of XAMPP, questions, comments, and anything related.

pdf support in xampp windows 1.7.1

Postby johnharford » 04. June 2009 07:17

Has anyone been able to get php to generate a pdf page using xampp windows 1.7.1?

php_info reports pdf support as PDFlib GmbH Version 5.03, PECL Version 2.1.6-dev

However when running a php script that SHOULD generate a pdf document, browsers return an error - IE stating it cannot display the page, FF tries to redirect to www.localhost.com and cannot find the page.

This happens even for the simple pdf examples given on php.net in the pdf reference.

Swapping php_pdflib.dll (presumably pdflib-lite) with the full commercial version - libpdf_php.dll (PDFlib GmbH Binary-Version 7.0.4p2) - results in pdf pages being generated but with the www.pdflib.com watermark across the page (since I have not bought a commercial licence). So I know the scripts are good.

Is this a bad install? Is the supplied php_pdflib.dll corrupt in some way?

Running on Windows XP Pro SP3
johnharford
 
Posts: 2
Joined: 04. June 2009 06:44

Re: pdf support in xampp windows 1.7.1

Postby Sharley » 04. June 2009 07:53

Open http://localhost in your browser so you are at the XAMPP Welcome Page, often called the XAMPP Admin Page.

Click on the CD Collection demo and then click on CD list as PDF document.

It should open a PDF window in your browser with the CD list.

If it does work, and it should, then check out the code in the 2 related cds php files in the C:\xampp\htdocs\xampp folder cds.php and cds-fpdf.php and see if the code gives any clues as to why it works in the cd demo but not in your code.

You may also be using the wrong php.ini file and this can be checked by clicking on the phpinfo() menu link in the above mentioned Admin Page and look for the line Loaded Configuration File - should be C:\xampp\php\php.ini in a default XAMPP 1.7.1 installation.

In my phpinfo() page I don't see what you are seeing under the PDF section.
Code: Select all
pdf
PDF Support    enabled
PDFlib GmbH Version    5.0.3
PECL Version    2.1.4
Revision    $Revision: 1.155 $


I am testing with the same XAMPP version and OS as you, XAMPP version 1.7.1 on an XP box using the FF browser but not IE.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: pdf support in xampp windows 1.7.1

Postby Wiedmann » 04. June 2009 11:07

Sharley wrote:Click on the CD Collection demo and then click on CD list as PDF document.

The CD Collection demo is not using the PDF extension.

johnharford wrote:Swapping php_pdflib.dll (presumably pdflib-lite)

Have you also tried the extension php_pdf.dll instead of php_pdflib.dll?
(only enable one of them.)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: pdf support in xampp windows 1.7.1

Postby johnharford » 04. June 2009 21:55

Thanks for the suggestion, but the CD Collection example does not use the PDFlib library but instead loads the ezpdf class - an entirely different beast with different functions. fpdf (used by cds-fpdf.php) is another class-based pdf solution. Neither has anything to do with the compiled PDFlib which PHP reports as being loaded in phpinfo().

php.ini is not in question here. If I was not using the right php.ini , I would not be able to get PHP to load the commercial version of the PDFlib library.
johnharford
 
Posts: 2
Joined: 04. June 2009 06:44


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 135 guests