?
Solved

Need some help setting up PDFLib

Posted on 2016-10-27
4
Medium Priority
?
129 Views
Last Modified: 2016-10-29
Hey, guys! Here's what I've got:

When I go to run a page whose job it is to build a PDF page, I get this error: "194 Fatal error: Class 'PDFlib' not found in /vagrant/html/application/helpers/StatementImager/AbstractStatementPDFGenerator.php on line 74."

I'm using the attached pdf, which is the manual that shows you how to install PDFLib, but I'm feeling like a pig on roller skates and I'm hoping somebody can point me in the right direction.

Here's what I'm thinking:

  • because I'm having to add some lines to my php.ini file, the fact that I'm using a Code Igniter platform doesn't change the way PDFLib is going to be installed. It's considered part of the PHP / system paradigm. It's not an "add on" within Code Igniter
  • I have this line in my php.ini file:
  • extension=php_pdflib.dll
  • In the manual, on page six (6.1), you see a section where this terminology is being used:
bind/php/php-<version>/libpdf_php.dll

I have no clue what that means and I'm thinking that's a dealbreaker / dealmaker right there.

Bottom line: It's not working and I need some help.

Thoughts?
PDFlib-in-PHP-HowTo.pdf
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 41862454
Maybe check the PHP online manual.  It may be more up-to-date than that 5+ year old document you've linked here.
http://php.net/manual/en/book.pdf.php
http://php.net/manual/en/pdf.installation.php

Also, there are other PDF generator libraries that are well-debugged and freely available.  Make a Google search for FPDF and TCPDF.  We have examples of both in Q&A here at E-E.
0
 
LVL 58

Accepted Solution

by:
Julian Hansen earned 1000 total points
ID: 41862521
Have you checked the http error logs to see if there is anything reported there.

I am guessing you are going to have to find the pdflib that matches your version of PHP and your Windows architecture (32/64 bit)
Copy this to your extensions folder.
0
 

Author Comment

by:brucegust
ID: 41862615
Julian, I'm using Google DEV tools and I don't see anything on the Console. So, unless there's somewhere else to look, all I've got is that error PHP is giving me.

What I have on my box is a duplicate of the working app that's online. The only thing that I can think of that would explain why I'm not able to get a PDF to show up on my screen is because of that "bind/php/php-<version>/libpdf_php.dll" line referred to in the manual.

BTW: The reason I'm trying to get this particular library properly installed is because it's the one used in the application I'm trying to troubleshoot.

What is "bind...?" Are there files that need to be included and where would I look for them? Is the "extension" line in my php.ini file the only thing that needs to be in place for this to fire correctly?
0
 

Author Comment

by:brucegust
ID: 41865577
I got it to work on my WAMP server as a test, but the Vagrant environment, where the site that I'm working on is hosted, requires me to use a VI dynamic to edit the php.ini file.

Do you smell that? That's the aroma of another question: https://www.experts-exchange.com/questions/28979816/How-to-Insert-a-File-Using-Text-Editor.html

Thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question