Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Write an Existing PDF using PHP

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Write an Existing PDF using PHP

Postby plodos » Mon Apr 22, 2013 12:18 am

Code: Select all
<?php require_once('../r/fpdf16/fpdf.php');    require_once('../r/fpdi/fpdi.php');
$pdf = new FPDI(); 
$tplIdx = $pdf->importPage(1); 
$pdf->useTemplate($tplIdx, 10, 10, 200); 
$pdf->SetXY(35, 146); 
$pdf->Write(1, "Sample Text");
$pdf->Output();   ?>

If user enter the .. link shows the manipulated pdf file in the php page.

If user enter the .. link shows the original pdf file...

How can I write the PDF file during downloading ?

Should I write special code in the httpdocs file ?

For Example;
If user call .pdf extension from special directory like directory/SAMPLE.pdf
execute the special function to process pdf file.

How do I solve this problem ?

I thank you for your interest in my question.
New php-forum User
New php-forum User
Posts: 1
Joined: Sun Apr 21, 2013 11:54 pm

Re: Write an Existing PDF using PHP

Postby johnj » Mon Apr 22, 2013 6:34 am

1). Good to convert all PDF file names to lower case.
2). When the user enters the file name, convert the file name to lower case and fetch the file.
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Return to PHP coding => General

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.