hi! i am tushar.
i am trying to insert digital signature in a pdf file using
PHP. i create a digital signature jpg image using
imagecreatefromjpeg() function, but whenever i trying to
insert it into my pdf file it shown this error.
"FPDF error: Not a JPEG file: signature.jpg". could some one
help me? how can i insert a digital signature in a pdf file
using PHP?



hi! i am tushar. i am trying to insert digital signature in a pdf file using PHP. i create a digit..

Answer / pavunkumar

I have given this example for creating pdf file with image
files. In Image function you need specify the image file name .

<?php
require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->Image('signature.jpeg',150,150,30,20);
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output("newfile.pdf","I");
?>

After executing this script , you will be getting the file
called newfile.pdf . Which will have a specified image .
and helloworld world string.

For more information . go through this url
http://www.fpdf.org/

Is This Answer Correct ?    6 Yes 4 No

Post New Answer

More PHP Interview Questions

What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?

1 Answers  


Do you know what is the use of the function 'imagetypes()'?

0 Answers  


What is a comment in php?

0 Answers  


Is json a string php?

0 Answers  


How do I display php errors?

0 Answers  






What are the different types of PHP arrays?

0 Answers  


Does browser understand php?

0 Answers  


Which of the delimiter is ASP style?

0 Answers  


where to change in php.ini file for file uploading?

1 Answers  


What is urlencode and urldecode in php?

0 Answers  


Can anybody plz tell me if there any recruitment on php plz mail to vasudev.adepu@gmail.com.i had completed M.SC(MATHS) in 2007 . trying to get a job on php. i have good knowledge on PHP/MYSQL

1 Answers  


Is php a cms?

0 Answers  


Categories