Webklex / laravel-pdfmerger

A FPDI PDF Wrapper for Laravel which includes the "merge" functionality
MIT License
110 stars 49 forks source link

Feature Request: Add Functionality to Add PDFs from Amazon S3" #48

Open nipunTharuksha opened 4 months ago

nipunTharuksha commented 4 months ago

Currently, the only way to add PDFs is through the function addPDF() that can only be linked to pdfs that already exist on the local, and integration or inclusion to the plugin to pull pdfs from Amazon S3 buckets before including them would be very useful to users. This addition would provide more flexibility and better user experience, helping users merge from pdfs in the cloud without necessarily downloading them locally. For us to achieve this, we propose to add another function addPDFFromS3() to the plugin that will factor the file’s path on S3, and all the other parameters familiar with the existing addPDF() function.

nipunTharuksha commented 4 months ago

PR raised https://github.com/Webklex/laravel-pdfmerger/pull/49

gotDaijobu commented 3 months ago

I used Nipun's great solution that works well.

Had a few troubles though in production. I built a quick workaround using temp files locally hosted instead of S3 temp urls.

Available here.

uevandalla commented 4 days ago

nd integration or inclusion to the plugin to pull pdfs from Amazon S3 buckets before including them would be very useful to users. This addition would provide more flexibility

Does this also support Digital Ocean buckets?

gotDaijobu commented 4 days ago

Haven't tried it but they are supposed to be interoperable with S3 SDK/API.