Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/mmishra/indem/iiita/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/mmishra/indem/iiita/pdf.php
<b>PDF Test</b>

<?php
$droot = $_SERVER["DOCUMENT_ROOT"];
echo $droot;

//$fd = fopen("/srv/www/websites/ada/documents/test.pdf", "w");
$fd = fopen("test.pdf", "w");

$pdfdoc = new PDFlib(); //pdf_new();
echo '1';
pdf_open_file($pdfdoc, "$droot/documents/test.pdf");
echo '2';
pdf_begin_page($pdfdoc, 595.3, 841.8);
echo '3';
$font = pdf_findfont($pdfdoc, "Helvetica", "winansi", 0);
echo '4';
pdf_set_font($pdfdoc, $font, 20);
echo '5';
pdf_set_text_pos($pdfdoc, 50, 795);
echo '6';
pdf_show($pdfdoc, "This is script generated pdf file");
echo '7';



exit;
$pdf = pdf_new();

pdf_open_file($pdf, "$droot/documents/test.pdf");
pdf_begin_page($pdf, 595, 842);
echo $pdf.' created';

pdf_set_font($pdf, "Times-Roman", 30, "host");
pdf_set_value($pdf, "textrendering", 1);
pdf_show_xy($pdf, "A PDF document is created!", 50, 750);

pdf_end_page($pdf);
pdf_close($pdf);

?>
<p>
Done


ZeroDay Forums Mini