This is a PHP or Perl script that creates PDF files by layering in other PDF files and graphic files, and adding text.
Some global attributes (global attributes of the PDF to be created) and an array of objects to be placed/created in the PDF are passed to the script. The script needs to:
1) Receive two variables: 1) global parameters, and 2) an array of objects to be placed.
2) Open an existing PDF document and duplicate it (creating a new identical file).
3) Add JPEG files to a page in the new PDF.
4) Add other PDF files to a page in the new PDF (note that we're layering a one-page PDF onto an existing page in the new PDF, not adding the existing PDF to the new PDF as inserted pages).
5) Add text to a page in the new PDF.
6) Save the file and a thumbnail GIF of the first page of the file.
7) Pass back success/failure with code(s) to explain.
Global parameters passed:
Existing file -- full path with file name of the PDF file to be duplicated
New file -- full path with file name of the duplicated file
Thumbnail file -- full path with file name of the thumbnail
Object-specific parameters passed:
kind of object - pdf, text, jpeg
source file - full path with file name of the PDF or JPEG file
destination page - the page in the new PDF where the object should be placed/created
position x - distance from left edge of page to left edge of object
position y - distance from top edge of page to top edge of object
scale - scale of PDF or JPEG being placed (1 = 100%)
width - width of the text object to be created
height - height of the text object to be created
text - text of the text object to be created
typefont - font of the text to be created
typesize - size of the text to be created
Please explain what technology you'd propose (PHP, Perl) and the main classes or modules you'd use.
For the text object, it would be helpful to pass tagged text to indicate size/bold/italic/etc. Is this possible? Please explain in your bid.
The server is LAMP (with PHP 5). Any Perl modules can be installed.
It needs to be well commented, and variables defined up front.
Please don’t propose/use an existing third-party script. I don’t want all the baggage of a “full-featured” script that does 20 things when all I need is the few simple things above. If you really want to use existing scripts, they need to be open source and you need to package them in a way that the excess code is removed or “hidden” -- AND YOU NEED TO EXPLAIN THEM IN YOUR BID or else I’ll assume you’re using none.