#Merging PDF files in laravel 10

1 messages · Page 1 of 1 (latest)

pearl kernel
#

Hello, i decided to make a thread for this one since i think its gonna be a pretty long one.... i've spent all day today trying to find a way to do this, the one thing i found is FPDI https://www.setasign.com/products/fpdi-pdf-parser/details/
Altought the F in FPDI stands for Free, its not free, atleast for merging PDF versions higher than 1.4 (today i also learned PDF files have versions). From the test PDFs that i have basically 90% of them are >v1.4, so the free version will not work. I really don't wanna buy this thing tho, because i was also able to find some alternatives that make me believe its possible to do it for free, but also that don't work.

Here are the packages:
1-2-3) These 3 don't mention anything about merging pdf higher than v1.5, and it gives me the FPDI error: https://github.com/Webklex/laravel-pdfmerger
https://packagist.org/packages/lynx39/lara-pdf-merger
https://github.com/DALTCORE/lara-pdf-merger

  1. This one mentions it does work with pdf versions above 1.4, but it was last updated in 2019, and it just straight up doesnt work when i try to install and use it.
    https://github.com/GrofGraf/laravel-pdf-merger

  2. This one has an option to create it using TcpdiDriver in order to fix the version 1.5 issue, but that class is not even in the package files, and it was last updated in 2020:
    https://github.com/hanneskod/libmergepdf

  3. This one claims it works on versions 1.5+ by using tcpdf/tcpdi/tcpdi_parser (again) but again, is doesnt work at all when installed https://github.com/despatates/lara-pdf-merger

So because of this reasearch, i tried looking for this TCPDF/TCPDI that i keep seeing mentioned in these packages, but i actually cant find any info about them, i just found some really old websites, and multiple of them so im not really sure which one is the real thing, but anyways i couldnt find any merge pdf options in those documentations.
I'm really stumped on what i tough would be a easy task, if anyone has any tips please let me know.

silk wraith
#

@pearl kernel Have you tried Googling "php merge pdf files”? I get plenty of results for free resources when I do—Stack Overflow answers, GitHub repositories, etc.

pearl kernel
wide vapor
#

I dont know if this is possible.. we have document generation software at work (paid)
but can you get the pdf in base64? otherwise you might just be able to merge the two base64 string together and then turn it into a pdf file?

works with docx.. i think

pearl kernel
#

I dont think the string mergeing would work, i found some people doing that for .txt files since those have straigthforward contents, but for PDFs i think theres a ton of metadata that you dont see, so just merging the contents wouldnt work