Re-Post: PHP script to add PDF tempate to content PDF
$30-250 USD
Completed
Posted over 12 years ago
$30-250 USD
Paid on delivery
Re-posted to clarify questions asked by bidders. I have attached a zip archive of sample files, including:
1. a thoroughly commented PHP file that defines the template and content PDFs to be used in the output
2. sample template PDFs
3. sample content PDFs (called "multipage PDFs" in the original post)
Original Post:
--------------------------------------------
I need a PHP script that will insert a PDF template file into an existing multipage PDF. It must receive two variables:
1. the relative URL of the multipage PDF
2. the relative URL of the template
It's a Joomla site, so TCPDF is already loaded. If you require any other libraries, make sure to include instructions for loading those libraries. If the libraries are not free, state the price in your communication but do not include it in your bid. We will purchase separately.
Use:
The site is [login to view URL], a manufacturer of telecommunications equipment. You'll notice that each product page has an HTML form to download a PDF spec sheet. The HTML form captures the distributor's contact information to be displayed at the bottom of the PDF. A hidden form input is the name of the PDF.
The script currently pulls static PDFs from directories that are named for each distributor. But this requires me to maintain separate PDF libraries for each distributor.
I want to keep one library of PDFs with blank footers and use this PHP script to insert the selected distributor's contact info. For the sake of graphic integrity, the distributor information will be kept in separate PDFs, not HTML, JPG, or plain text.
--------------------------------------------
Here's the commented PHP file, for quick reference:
<?php
defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
?>
<?php /* ---------------------------------------------------------
It is your job to create the file '[login to view URL]' which will generate a PDF from the defined 'template' and 'content' PDFs at a GET-style URL. Example URL:
'[login to view URL]'
--------------------------------------------------------- */ ?>
<form action="[login to view URL]" method="GET">
<h3>Download Specifications PDF</h3>
Select Your Distributor:
<?php /* ---------------------------------------------------------
The following select menu defines the filename of the template PDF to be used
Template PDFs will be stored in the following path relative to '[login to view URL]' and '[login to view URL]': 'spec-tmpl/'
--------------------------------------------------------- */ ?>
<select name="template">
<option value="[login to view URL]">no distributor</option>
<option value="[login to view URL]">Rincon Technology</option>
<option value="[login to view URL]">TelWorx Communications</option>
<option value="[login to view URL]">UNICOM</option>
</select>
<?php /* ---------------------------------------------------------
The code "<?php echo $jumi[0]; ?>" in the following line captures the filename of the content PDF from a Jumi script.
Examples of content PDF filenames:
//// [login to view URL]
//// [login to view URL]
//// [login to view URL]
//// [login to view URL]
//// [login to view URL]
//// [login to view URL]
// Content PDFs will be stored in the following path relative to '[login to view URL]' and '[login to view URL]': 'specs/'
--------------------------------------------------------- */ ?>
<input type="hidden" name="content" value="<?php echo $jumi[0]; ?>" />
<input type="submit" value="Download PDF" />
</form>