how to fill in excel table from PHP - php

I need some library or good documentation of xlsx files for writing out xls files from website. all I need to do is fill in content into predefined and styled table. I have considered writing everything directly from php but could't get hang of merging cells and if I could it would be a hell writing code for changing any style into a document instead its much better if I have predefined file uploaded and then just fill in.
Please redirect me or help me find some proper documentation.
Project is in early stage and can consider switching to other language like Node.js if it makes this part super easy but trying to keep it low profile prefer using PHP so i'm open to all ideas.
Thanks in advance to everyone.
PS. this is my first question on stackoverflow

Kindly do a Google search before posting questions like this. But answering your question, PHPExcel is a nice place to start. Just go through their documentation.

Related

How would I make an pdf without using an php library?

I've been looking for creating a pdf using php without using a library but when I was looking on google for this I am not being able find any information how a pdf is made within php. Now I know the simple answer is 'Look at the code of an existing library'. But this does not give me much detail and how/why certain lines of codes are being used and what is or what isn't bad practice.
I hope, any of you have some prior experience with this and can help me out.

Extracting text from PDFs in PHP

I'm creating a php based web application which allows the user to upload a PDF file. This file will then be read and checked for certain data (text).
The problem is I can't figure out how to even open a PDF file in PHP. There are some PDF libraries mainly for creating PDF's, but they don't seem to be very good at reading them.
An alternative solution would be to use an already available solution in Python or something else (as described in other threads on this site) but I'd really like to stay as much as possible in PHP as I intend to later export the data to mysql, etc.
Any input on how to read a PDF and extract data from it would be much appreciated.
I personally haven't tried this out, but it looks like this one works: http://www.pdfparser.org/documentation
It's just a matter of downloading and telling your code to include it, just like the documentation shows.
Or you could try the class.pdf2text.php found in http://www.phpclasses.org/browse/file/31030.html

Annotate and draw on PDF with PHP in Browser and save to PDF-format again

I have been scouting the web for a pdf editing tool for quite some time now. And it would therefore be nice with some suggestions/recommendations to the problem.
I have read a bunch of other topics around StackOverflow, but havent quite been able to find a full solution yet.
The case: I have an application written in php/javascript on a linux server and recently it has become a requirement for my customers that they are able to edit Pdf documents direct in the browser. The functions i need are primarily the ability to make annotations and to draw on the PDF. That means. They load an already uploaded PDF-document and edits it and then saves it in PDF-format again. All done within the browser.
The second requirement is that the program must save pdf document in PDF-format again, since i have an Ipad app with all of this functionality, and i need them to play nicely together. It is therefore not an option to save an image of html of something like that.
I read a comment suggesting the Zend framework, and it did sound quite useful. However i have developed my own platform from the ground, and therefore my second question is, if it is possible to embed only the PDF-tool from Zend or something?
Thank you in advance.
ps. If i missed a simular subject that answers exactly this, please let me know and i'll delete again.
There are several libraries that can be used to edit PDF-files. To name a few: Tcpdf, fpdf and Zend_Pdf.
The later can be used even without the complete ZendFramework. But be cautious: Currently it only allows editing of PDF-Files up to version 1.4.
If you need speed you should also have a look at the PDFlib which could be tweaked to support your usecase

Parsing PDF file using PHP to submit values to MySQL

I want to know if it is possible to view a PDF file in a webapp of some kind, then be able to trace over lines in the PDF file and submit the lengths to an MySQL database.
Basically import a PDF file, trace around a shape in that PDF file and save those values.
I work with House plans and this would make my job a lot easier.
Is it possible? and can someone point me in the right direction on where to read more.
I know its possible to pull text from a PDF file, I've seen heaps of info on how to do that using various libraries, but nothing on a Vector shape (house plan).
If it's not possible in PHP which language should I look into, the only reason I ask is because I have basic skills in PHP and have already written some simple apps that help me out, this would just be the final touch to make my job easier.
Thanks
Parsing PDFs is a world of pain... And PHP is probably as good language to jump into this as any other.
I would recommend you to start your research with GhostScript, it has a CLI interface which could be accessed by php

Search through PDF files with PHP

I'm trying to find a way to search inside PDF files. I came accross the PHP PDF class but I can't seem to find any function for reading/searching a filestream.
So, as naive as I am, i tried to simple get a stream using file_get_contents(), obviously it's an encrypted-like output ;)
So my question, is there any way to search through PDF files? I'm looking for script-only / free / open source solutions and not buying some expensive commercial libraray.
XPDF?
There is a blog post here that may be of help.
There seems to be some code here that could help - a simple class that reads a PDF into plaintext. Unsure if it supports decryption.
There are also a number of resources in PHP documentation that may help you. Click.
FPDF and FPDI may also help. Probably your best bet after some research.**
A PHP search engine called Sphider has the option of adding PDF search via XPDF. You can then customise the result templates to fit in with the rest of your site (if applicable).

Categories