Image processing in php and get PDFof processed image?

If you're on a Linux server with ImageMagick installed you can do something like: exec("convert foo. Jpg bar. Pdf").

How you place your image in a PDF depends on how you're going to create the PDF. There are extensions and PHP classes that allow you to directly create a PDF (CPDF, FPDF, TCPDF). There are also classes and programs that allow you to create a PDF from an HTML document.

The PDF classes give you more precise control, the HTML to PDF classes make it easier to work with since most PHP developers already know HTML to some degree. Your situation is simple enough I would be inclined to use a PDF-generating class. You don't specify how you get the values of $text1, $text2, and $text3.

Presumably they are provided by the user. So what you would want is an intermediate PHP that collects the user input and creates your PDF. You then reference your image-generating PHP using a full URL.

Something like the following would work (using EZPDF+CPDF): ezImage('http://example.com/image.php?text1='. Urlencode($text1)); $pdf->ezStream();? > I typically work with DOMPDF, which converts an HTML document to a PDF document.

The same using this library would be something as simple as: load_html('http://example.com/image.php?text1='. Urlencode($text1)); $dompdf->render(); $dompdr->stream();?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions