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

Does https prevent csrf?

0 Answers  


What are the different types of statements that are present in php?

0 Answers  


What is symfony php?

0 Answers  


Write down the code for saving an uploaded file in PHP.

0 Answers  


How to create database connection and query in php?

0 Answers  






Tell me what should we do to be able to export data into an excel file?

0 Answers  


How to reset/destroy a cookie?

0 Answers  


How do you check if an arraylist is empty?

0 Answers  


How can I display text with a php script?

0 Answers  


How failures in execution are handled with include() and require() functions?

0 Answers  


How to download the files using PHP

1 Answers  


What is the delimiter default in PHP?

0 Answers  


Categories