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

Can the value of a constant change during the script's execution?

0 Answers  


Use of Session

6 Answers  


Why session is required?

0 Answers  


What is php limit?

0 Answers  


Is php procedural or oop?

0 Answers  


What is final keyword in php?

0 Answers  


Why print_r is used in php?

0 Answers  


What does == mean in php?

0 Answers  


How do I know my xampp version?

0 Answers  


What is the maximum size of a database in mysql?

0 Answers  


I created a new joomla module for administrator. when am going to install this, it is going "joomla/modules" path. but, i want to install this in the "joomla/administration/modules" path.

2 Answers  


What is the difference between rest and soap?

0 Answers  


Categories