merge two file pdf into one file override? - php

I have two file pdf, 1st file containing the chart and 2nd file contains information chart.
How to pair the two files back together, right with the position of each page.
I using php,apache2,ubuntu.
Thanks!

Well your question is very ambiguous but going by what I understand, I think you would first need to extract the contents of both pdf's and then map them according to their values from pdf1 to pdf2. For this you can use Tesseract OCR to extract the data and then by writing your code you can try and match them according to their position on page.
Maybe if you just elaborate your question a bit I could help you more.

Related

PHP - merge two different data source in single source

I may mistitled this question here but i will explain what I want for you guys>>
so basically I have two data sources:
url that outputs pdf pages
another php file that outputs html
so what i simply want is to get the content of these sources from single file which would be the php file.
what i have in mind is to use file_get_contents function to inject my php file with those pdf pages but im not sure if this is right or good idea
any ideas how to do that ??? im really stuck guys

Is that possible to extract doc/docx file page wise in php?

I have a web form where user needs to upload a document file (doc or docx), in that file there is some formatted data on multiple each page. so I want to extract that data but I also need to know page number as well. That means I want content of each page separately, is it possible?
Thanks
Its not in raw format, so you want this maybe to interpret the code of docx.
https://github.com/PHPOffice/PHPWord Check this.

PHP: Detecting ID from a Scanned Document using Bubbled-In Numbers

I am working on a form that can be scanned in and uploaded to my server. I need a script (preferably PHP, but others are welcome) that can read in a 4-digit ID number from the form.
My current plan for the form is to have a table like this:
So, the plus marks show the boxes or bubbles that a person has filled in using a pen. In this example, the ID would be '2014.'
My question is, what is the best way to detect which digits have been filled in?
I assume I should color code the table so that I can find the rgb values within that color range so I know where the table starts and ends. Then I assume I could use the position of each box and check that area to see if the average values inside are above a given threshold.
Anyone done anything similar to this or have any advice / scripts that may help solve this?
Use a barcode of a suitable format, and use a library to read and decode the barcode. I've linked php-zbarcode, which uses ImageMagick and zbar and can decode most barcode formats, including QR codes.

Using JQuery or PHP to pull latest image?

I was trying to figure out a way to have JQuery (if possible) to display the latest image from a directory, regardless of its file name. Basically, I just want a simple tag to be updated to show the image. I realize this might not be possible with Jquery, so my fallback would be PHP.
I've been trying to research how to do this, but honestly do not know where to start. Any tips to get going would be greatly appreciated,
If you want to do it with JQuery, you can! You only need to add a few lines of logic to your app.
For example, when you add images to that folder, also write a text file with the name of the image just added. Then this text file is going to always have the filename of the last image uploaded. Finally, using JavaScript(with JQuery or anything else) you do one request to the text file and then you do the second request to obtain the image with that filename.
That is just a very basic example to try to share the idea of how to do it, then depending your particular case, you can add or change a lot of details to make this works for your case.
BTW, to do it with PHP, you are going to need to execute a system command, for example 'ls -ltrh' and parse the output to obtain the last filename.
You can use PHP script to get latest modified file in a specific directory.
Code can be found here: Get last modified file in a directory
You then can format that into JSON which can be passed through a jQuery AJAX call http://api.jquery.com/jQuery.ajax/
With those 2 techniques, you can manipulate the data to display the image.

webcontent save in csv format

I want to read the content from website and save then into a csv file in php, can anyone please tell me how I can do this.
How do you want to save a website's content as csv file? CSV means comma separated values, and it's really easy to save things as csv file but a website's content?
You say "the content from a website" - normally you'll start reading one sites content, which includes html markup, scripts and styles. Or do you only want to get the text contents or some meta data?
If your server supports opening urls via fopen I'd try this one (php.ini option: allow_url_fopen) - otherwise you'll have to use cURL or something.
Here's some more information about reading websites in php.
Regarding the storage of websites as csv I think you should be more precise what you want to achieve.
Regards, Daniel
There's no instant-magic answer for your question. We (You) need to know which website is in question, how the table is presented. If you know everything about your scenario, you should use PHP's DOM functions and parse your table then export it to a CSV.

Categories