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
Do you know is it possible to extend the execution time of a php script?
Tell me how is it possible to return a value from a function?
What is use of header() function in php? What the limitation of header()?
Which of the data type is compound datatype supported by PHP?
Can we learn php without html?
Tell me how to find current date and time?
How to create reusable code in php?
How to get ip address of clients machine?
How to swap two variables without using 3rd temp variable.
How many days will it take to learn php?
How to access a specific character in a string using php?
What are different types of Print Functions available in PHP?
How big is varchar max?
How to check an element is exists in array or not in php?
Which function is used to strip whitespace?