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 does php start with variables?
What is difference between mysql_connect and mysqli_connect?
What is the use of the function htmlentities?
Can you convert php to html?
What is php session and how it works?
How do I run a php script in windows?
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
What are different types of Print Functions available in PHP?
Which function will you use to create an array?
Do you know how to declare an array in php?
Tell me how to find current date and time?
Does php 5 support exceptions?
What is a namespace in php?
What is php and what does it do?
When viewing an html page in a browser, the browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?