?
Solved

I need a very specific php/pdf solution

Posted on 2009-04-17
7
Medium Priority
?
292 Views
Last Modified: 2012-05-06
I have a div with several other divs and tables in it. The inner divs contain customer related data which is further broken out by sub category....The main div was created by PHP 5. I am in need of a PDF generation solution which can take my code and automatically parse it out by customer, into 1 pdf for each customer. I have already tried many solutions so far all of which do not work for me, including but not limited to fpdf.

This should be simple...but I don't want to end up coding a pdf library...and I'd rather not learn one either. The main reason is simple....I'm not a pdf expert and don't pretend to be. I know php fairly well but all of this pdf stuff gets very complex with positioning and very frustrating when positions spew elements in locations I never told the application to...or worse, the library cannot print array contents on screen!

Is there a simple solution for me? What is it? Can you give me any hints on implimenting it? I appreciate help.
0
Comment
Question by:rae_rae
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 6

Assisted Solution

by:segurah
segurah earned 664 total points
ID: 24172942
Simple? generate a html then convert o pdf with dompdf http://www.digitaljunkies.ca/dompdf/about.php
0
 
LVL 14

Assisted Solution

by:shobinsun
shobinsun earned 664 total points
ID: 24173692
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 672 total points
ID: 24175250
"Is there a simple solution for me?"

I would say there is a simple solution, but it is labor intensive, and it has a learning curve that is pretty steep.  FPDF has been very successful for me - I have generated all kinds of client documents with variable data printing and even my own business cards ;-)

But FPDF requires, as I am sure you have discovered, a substantial amount of detail-oriented, time-consuming work to get the algorithms set up and running right.  I spent a considerable amount of time with FPDF when I was learning - perhaps a week or more just tinkering and testing functions, working through the manual to see how everything played together.  And as a result of that, it's quite easy for me to make my way around FPDF.  Frankly, no other "solution" even came close.

So my candid advice is that if your view of PDF creation is "I'd rather not learn one either." - then you should hire a developer to tackle this issue.  I just do not see a custom solution falling into your lap without the detail-oriented work that is necessary for page setup and data positioning.  And at the same time I can say from personal experience that the results you can get from FPDF are simply excellent.  It is very fast and highly predictable in its behavior.

Best of luck with it,
Ray
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:segurah
ID: 24194233
Another choice that is also very ease, is ezpdf, do you test it?
0
 
LVL 3

Author Comment

by:rae_rae
ID: 24194293
>>This should be simple...but I don't want to end up coding a pdf library...and I'd rather not learn one either.
I do appreciate everyone giving me ideas but each time I try using one of these libraries, I get errors or they just don't work. I don't think that it should be as difficult as it seems either...So, I'm assuming that I just don't know what I'm doing and I'm going about it all the wrong way.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 24236145
"I don't think that it should be as difficult as it seems" - that is almost always a good sign that it is time to consider hiring a developer who is familiar with the technology.  Best of luck with it, ~Ray
0
 
LVL 3

Author Comment

by:rae_rae
ID: 24237262
I actually ended up using pdflib...I'm still working on it but making lots more headway.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

850 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