2

I am currently working on a website. Basically when a user searches for something, i should be able to generate the pdf for the each of the search result item. I know one option of fpdf.

Is there something easier than fpdf or some service like if i send the url of my search result page, it sends back the generated pdf to me.

What is the easiest way to do this, what is the easiest option for this?

Thanks

1
  • good luck, everything I know is crap :) Commented Dec 21, 2009 at 8:16

3 Answers 3

4

Have you looked at the Zend Pdf class?

There are a number of ways to generate pdf by using php, but i still think you will need to generate the whole pdf based on the data you want in to add to the pdf. But if you create some good helper classes, you should be able to create the wanted effect!

There is a service called pdfonfly That could do what you want, but you need to check if they provide an api to hook up your results!

Sign up to request clarification or add additional context in comments.

Comments

4

PDF is a plain-text format, very easy to generate from code. (Usually it is compressed however fundamentally it is plain text.)

The basics are very simple, like high school algebra. You have a plane and an origin. And you draw points or lines at coordinates. Of course you also place text at a coordinate with a built-in font.

So, if your needs are very simple, you could pretty easily read the freely-available PDF spec and generate whatever you need—not ideal for all situations but it's easier than you think.

1 Comment

16 months later, I got an upvote! Thanks! I still stick by this answer. PDF is more accessible than people think, especially generating it.
1

I worked with the FPDF library some time ago. It's entirely written in PHP and requires no installation at all. Just include it and you're ready to go.

The generation of PDFs is pretty simple with it, too.

1 Comment

I answered to do it from scratch however if it is as easy as you say it is, +1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.