Just wondering if it is possible to generate a pdf file from php without the need to use external libraries?
Is there any method possible as i want to pass some content in php and make a pdf copy or file of that content.
For some reasons I don’t want to use external dependencies just pure inbuilt workflow.
If this is archivable please i will need to be guided on how to archive it but if i must use dependcies or libraries then any suggestions on good libraries to use.
All that a library such as FPDF (the only one I’ve looked at, I just presume the others are the same) is do all the work for you - there’s nothing to stop you manually creating a PDF file by writing all the various information out manually, just like you could write out an Excel file without using a library once you know the format. I used to have some code to generate PalmOS PDB databases that ran on my server, just based on the documentation for the file format and some home-grown code, for example.
Have a look at the PDF that FPDF creates, and write your own function(s) to do the same. Or maybe there’s some documentation on the PDF format that will allow you to do it without referring to someone else’s work - I’m not sure where your code is going, and what the creators of FPDF (or whichever one you pick apart) would think of that approach.
Most of these libraries are the same IMO - they just save you from having to reinvent the wheel, rather than doing things that would otherwise be impossible.
(* To clarify again, every time I say “FPDF” I do mean “any PDF library”, I believe there are quite a few now.)
Thanks alot @droopsnoot
I was viewing the FPDF folder i just want to remove certain things from it and have a more clear and lighter function to create the pdf, especially i want to use some set of font’s or normal text without having to import it fonts.
I will like to give it a try and see what i can modify out from the original FPDF but if nothing i may end up using it out of the box just that i see it as too bulky piece of files.