I require you to write a PHP function that I can call like this....
combine_pdfs($input_files,$finished file) // this is the function you need to write
//combine $input_files into $finished file
$input_files=array('[login to view URL]', '[login to view URL]'); // this is input
$finished_file='[login to view URL]'; // this is input
combine_pdfs($input_files,$finished_file); // this initiatives the PDFs to be merged
As you can see above, I would pass into the function 2 or more Urls of existing PDF files on the local server, and then the name of the finished PDF I want.
The function would combine the PDF files, saving them into 1 PDF by the name that is passed to it.
In the above example the final combined PDF file would be called '[login to view URL]'.
Both the input PDF files and the output PDF files should be relevant links to the script running.
For example, I could alternatively pass in relative URLs such as…
$input_files=array('/images/[login to view URL]', '/files/pdfs/[login to view URL]');
I know that there are PHP libraries that already do what I'm asking, such as FPDF ([login to view URL]) and FPDI ([login to view URL]). I am happy for you to use these existing libraries (copying and pasting them as you need). However, I don’t want a solution that involves multiple folders and multiple files. Having multiple files and folders will confuse me.
I just want 1 php file. It’s okay if the PHP file is very long (thousands of lines), containing many functions/classes all in the one file. That’s fine.
My goal is for there to be only 1 PHP file, and that I am able to initiate the PDF merging with 3 simple lines of code…
$input_files=array('[login to view URL]', '[login to view URL]');
$finished_file='[login to view URL]';
46 freelancers are bidding on average $157 for this job
Hi, I went through your requirement and feel comfortable to do this job. I have good experience in website design & development. Please initiate chat to discuss further.