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?
Answer Posted / 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 View All Answers
Why should I store logs in a database rather than a file?
Tell us what does $_cookie means?
What is the default session time in php?
What is the difference between for and foreach?
What is htaccess in php?
Why do we use in php?
What is zend studio for?
Where is session id stored?
What does namespace mean in php?
What is die in php?
What is difference between web service and api?
What is an associative array?
How to invoke a user function?
What type of headers that PHP supports?
Tell me what is the main difference between php 4 and php 5?