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 / 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 |
Actually am working in existing project which is developed in .net, am converting the .net into php code. am facing problem after uploading the .php in server. amgetting the error message like "The page cannot be found" but its working perfectly in local host
Name some of the constants in php and their purpose.
How to compare two strings with comparison operators in php?
What are the different functions in sorting an array?
what is the url rewriting?how to rewrite the url? give any example
Explain Booleans in PHP?
how to extract month from given date by using string functions?
How do you identify independent and dependent variables in research?
Tell me how to find the position of the first occurrence of a substring in a string?
Is learning php easy?
What is framework? How it works? What is advantage?
How to convert strings to upper or lower cases?