We want to generate & validate PDF files with configuration mention into CSV or XML or TXT files via from database records, How can we do it?
I come to know about PDFTK library, but not sure, whether it is suitable for generating auto populated PDF files.
Also i wonder, how can we validate PDF files, means to check, if any fields has been left blank or something?
Related
I have 70gb PDF files, and I want to search inside them with PHP and some Ajax.
The code must search on all PDF files and extract the data out into table,
For example: 1547AD
When I hit enter the code will search in all PDF files and extract all PDF files that contain "1547AD" inside them.
My problem is: of course putting these data inside MySQL will be better for the server and stronger but imagine extracting all tables in 70GB of PDF files! and these pdf files updated daily, also there is alot of traffic on this page.
My question is: Is it the right way to build this in PHP or I should use another language and/or another method for this kind of heavy data?
I am currently working on a web page that should do the following. As a little background, we are working on uploading a bunch of data that has a decent level of user-errors in the cell formatting to a database.
The data is stored in Excel spreadsheets. The spreadsheets are formatted in the same way, (99.9% of the time) but occasionally there are some wonky values within the cells themselves. Here is my goal: I would like the user to be able to
1) Provide the excel file to the page
2) Parse the file with PHP, then send the newly extracted data to a table on the page with editable cells
3) The user can see what came out of their file, then correct it for any slight errors before choosing to send the extracted data to the database.
I can do steps 2 and 3 using PHPExcel with a test file stored on the server, but I am having trouble getting from step 1 to step 2. My vision is to have the user specify the Excel spreadsheet and do the parsing without leaving the current page and losing the data in the fields. I would really like to keep the page from changing, as there are additional text fields on the page and I actually have to parse TWO spreadsheets before the data is taken from all of the fields and sent off to the database.
I guess I'm wondering if there's a way to use a client-provided file in PHP without doing a POST to upload. OR if there's a way to upload the file and have it parsed without leaving the page. I'm new to web development, so excuse me if those last few sentences made absolutely no sense.
Any thoughts?
PHP cannot do a single thing to the file until it is uploaded to the server. You could put a file upload form in an iframe and do some AJAX-y thing as described here.
As for handling PHP file uploads, the docs have a whole section.
Auto-generate multiple PHP files from Template and excel files
Am looking for suggestions to efficiently auto-generate multiple PHP (and HTML) files from a template doc pulling fields from an excel file
What I want to do is:
1. Populate the fields in the template file from an excel file, each excel row will generate a new file
2. Save it as a PHP file
3. Name each generated file based on specified field in the correspondig row
I am intentionally trying to multiple and separate static HTML and PHP pages. Have been using mail merge with word and excel, but, takes to long to resave word file as php and rename, etc. Not sure how to programmaticaly do this, and my skillset is limited.
Open to different approaches to handle this, appreciate any help and thoughts.
Thanks!
I have created PDF file by using php script and FPDF lib. It works fine, i have created two files named index.php and create_result.php in the file create_result.php i have written the php script for pdf file. what i want is that if i changed any program in this file there is no change in pdf file. my confusion is how to change the pdf file ,
ex:(result.pdf).
In the result.pdf file i have made a registraion form , if i want to change any thing in this result.pdf in the sense what should i do for a change?
Two things:
Does the Server have the permission to overwrite the PDF
Do you write Data from you login-Script into the PDF? If so, you have serious problems with multithreading, becaus one user can change the PDF for another user. You have to write a temporal PDF-File per user, with a unique filename.
My PHP script have to create a multi-tabs Excel file with a report in each tab, but those reports already exists as HTML pages, so I don't want to duplicate code and work.
I know I can rename a HTML file to .xls, and Excel/OpenOffice Calc will open it as a spreadsheet, but I don't know how to have severals tabs.
I do not even know if it is possible.
I already know Biffwriter and others PHP libs to create Excel file, but I am looking for a smarter solution.
Thanks,
Cédric
Pear Excel Spreadsheet Writer has a function to create new Worksheets if thats what you are looking for.
If you don't mind serving excel 2007 files, you can do this:
create an excel 2007 file
create all the tabs you need
save the file
rename the file as .zip
extract the contents of the zip file
Now you can use the file structure there to populate the file corresponding to each tab with the report you need. You may want to use them as templates, keep the same code and render different files depending on whether you generate the html report of the excel report.
In the end, zip up the entire directory structure and serve it with an xlsx extension.
Please check the URLS of
a library
and
turorials
from IBM and
from 999Tutorials